Commit 77def08f authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix for returning whole monitor name

When *OPT1,2 is enabled ResourcefS would return the whole name including path, when it's supposed to only return the leafname. Scan for the last dot to do so.
Replace magic 0/1/2 with object_nothing/file/directory from Hdr:LowFSI.

Version 0.26. Tagged as 'ResourceFS-0_26'
parent 3a836291
# ResourceFS *Help Messages file
ResourceFS:*ResourceFS selects the ResourceFS filing system.
# ResourceFS Syntax Messages file
ResourceFS:Syntax: *ResourceFS
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.25"
Module_Version SETA 25
Module_MajorVersion SETS "0.26"
Module_Version SETA 26
Module_MinorVersion SETS ""
Module_Date SETS "19 Jan 2010"
Module_ApplicationDate SETS "19-Jan-10"
Module_Date SETS "18 Aug 2016"
Module_ApplicationDate SETS "18-Aug-16"
Module_ComponentName SETS "ResourceFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/ResourceFS/ResourceFS"
Module_FullVersion SETS "0.25"
Module_HelpVersion SETS "0.25 (19 Jan 2010)"
Module_FullVersion SETS "0.26"
Module_HelpVersion SETS "0.26 (18 Aug 2016)"
END
/* (0.25)
/* (0.26)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.25
#define Module_MajorVersion_CMHG 0.26
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Jan 2010
#define Module_Date_CMHG 18 Aug 2016
#define Module_MajorVersion "0.25"
#define Module_Version 25
#define Module_MajorVersion "0.26"
#define Module_Version 26
#define Module_MinorVersion ""
#define Module_Date "19 Jan 2010"
#define Module_Date "18 Aug 2016"
#define Module_ApplicationDate "19-Jan-10"
#define Module_ApplicationDate "18-Aug-16"
#define Module_ComponentName "ResourceFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ResourceFS/ResourceFS"
#define Module_FullVersion "0.25"
#define Module_HelpVersion "0.25 (19 Jan 2010)"
#define Module_LibraryVersionInfo "0:25"
#define Module_FullVersion "0.26"
#define Module_HelpVersion "0.26 (18 Aug 2016)"
#define Module_LibraryVersionInfo "0:26"
......@@ -60,7 +60,7 @@ Module_BaseAddr
GET Hdr:Proc
GET Hdr:FSNumbers
GET Hdr:HighFSI
GET Hdr:LowFSi
GET Hdr:LowFSI
GET Hdr:NewErrors
GET Hdr:Variables
GET Hdr:Wimp
......@@ -927,6 +927,14 @@ ReadOnlyError
MOV R7, R2 ; save address to load it to
BL FindFile
MOV R8, R6 ; isolate leafname
11
LDRB R14, [R8], #1
TEQ R14, #'.'
MOVEQ R6, R8 ; update latest leaf start
TEQ R14, #0
BNE %BT11
MOVS R8, R4 ; length into R8
EXIT EQ ; zero length, we've finished
......@@ -1081,8 +1089,8 @@ romfs_fsfunc_readdirentriesinfo ROUT
Push "R0-R5"
CMP R14, #"."
MOVNE R5, #1 ; type = file
MOVEQ R5, #2 ; type = directory
MOVNE R5, #object_file ; type = file
MOVEQ R5, #object_directory ; type = directory
TEQ R0, #fsfunc_ReadDirEntries
ASSERT ROMFile_Load = 4
LDMNEIA R2, {R0-R4}
......@@ -1210,8 +1218,8 @@ ROMFS_MediaToBuffer Entry
FindFile Entry
BL FindFileOrDirectory
TEQ R0, #2
MOVEQ R0, #0 ; can't accept directories
TEQ R0, #object_directory
MOVEQ R0, #object_nothing ; can't accept directories
EXIT
......@@ -1263,7 +1271,7 @@ FindFileOrDirectory Entry
BL QuickIndexFind
MOV r4, r1
BL WildMatch ; Check for directory matches
MOVNE r0, #0 ; not found
MOVNE r0, #object_nothing ; not found
MOVNE r2, #0 ; load=0
MOVNE r4, #0 ; length=0
EXIT NE
......@@ -1276,8 +1284,8 @@ FindFileOrDirectory Entry
TEQ R14, #0
ASSERT ROMFile_Name-ROMFile_Load = 16
LDMDB R6, {R2-R5} ; get R2-R5
MOVEQ R0, #1 ; indicate file found
MOVNE R0, #2 ; this must be a directory
MOVEQ R0, #object_file ; indicate file found
MOVNE R0, #object_directory ; this must be a directory
MOVNE R4, #0 ; length = 0
MOVNE R5, #0 ; attributes = 0
EXIT
......@@ -1291,7 +1299,7 @@ FindFileOrDirectory Entry
CMP R3, #0
MOVEQ R2, #0 ; load = 0
MOVEQ R4, #0 ; length = 0
MOVEQ R0, #0 ; indicate not found
MOVEQ R0, #object_nothing ; indicate not found
EXIT EQ
LDR R1, [R3, #link_data]
......@@ -1317,8 +1325,8 @@ FindFileOrDirectory Entry
TEQ R14, #0
ASSERT ROMFile_Name-ROMFile_Load = 16
LDMDB R6, {R2-R5} ; get R2-R5
MOVEQ R0, #1 ; indicate file found
MOVNE R0, #2 ; this must be a directory
MOVEQ R0, #object_file ; indicate file found
MOVNE R0, #object_directory ; this must be a directory
MOVNE R4, #0 ; length = 0
MOVNE R5, #0 ; attributes = 0
......
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