Commit 8cdba019 authored by Jeffrey Lee's avatar Jeffrey Lee Committed by ROOL
Browse files

Fix register corruption in CopyFile_EnsureDestFileWriteable

FileSwitch 2.90 introduced a register corruption bug in *Copy which
would (typically) result in an abort if the copy isn't going ahead
because the destination exists. This was down to the (undocumented)
input of R7 being corrupted by the call to EnsureCanonicalObject, and
not being restored before it gets used later on by the call to
Util_PrintName.

Fix the code to restore R7 before calling Util_PrintName, and update the
comments surrounding a couple of functions to make sure at least some of
the undocumented inputs are documented.

Fixes issue reported on forums:
https://www.riscosopen.org/forum/forums/4/topics/17802

Version 2.92. Tagged as 'FileSwitch-2_92'
parent 81d3304d
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
Module_MajorVersion SETS "2.91"
Module_Version SETA 291
Module_MajorVersion SETS "2.92"
Module_Version SETA 292
Module_MinorVersion SETS ""
Module_Date SETS "13 Mar 2023"
Module_ApplicationDate SETS "13-Mar-23"
Module_Date SETS "25 Mar 2023"
Module_ApplicationDate SETS "25-Mar-23"
Module_ComponentName SETS "FileSwitch"
Module_FullVersion SETS "2.91"
Module_HelpVersion SETS "2.91 (13 Mar 2023)"
Module_FullVersion SETS "2.92"
Module_HelpVersion SETS "2.92 (25 Mar 2023)"
END
/* (2.91)
/* (2.92)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 2.91
#define Module_MajorVersion_CMHG 2.92
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 13 Mar 2023
#define Module_Date_CMHG 25 Mar 2023
#define Module_MajorVersion "2.91"
#define Module_Version 291
#define Module_MajorVersion "2.92"
#define Module_Version 292
#define Module_MinorVersion ""
#define Module_Date "13 Mar 2023"
#define Module_Date "25 Mar 2023"
#define Module_ApplicationDate "13-Mar-23"
#define Module_ApplicationDate "25-Mar-23"
#define Module_ComponentName "FileSwitch"
#define Module_FullVersion "2.91"
#define Module_HelpVersion "2.91 (13 Mar 2023)"
#define Module_LibraryVersionInfo "2:91"
#define Module_FullVersion "2.92"
#define Module_HelpVersion "2.92 (25 Mar 2023)"
#define Module_LibraryVersionInfo "2:92"
......@@ -1455,6 +1455,9 @@ CopyDirectory Entry
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; See if the destination file already exists or is a dir
; In r7 = source file desc^, source exists !
; r8 = dest file desc^
; Out Much corruption
; r1, r6, fscb set up for dest
......@@ -1521,6 +1524,7 @@ CopyFile_EnsureDestFileWriteable Entry "r7"
20 ; Destination is a file or
FRAMLDR r7
LDR r14, util_bitset ; Is source newer than dest ?
TST r14, #util_newer
......@@ -1707,6 +1711,7 @@ fsw_already_exists_and_is_locked_confirm DCB "CC10", 0
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; In r5 = source object attributes
; r7 = source file desc^
Copy_DeleteSourceAfterCopy Entry "r1"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment