Page 1 of 1

Issue with shell command "List"

Posted: Mon May 04, 2020 8:18 am
by Amigo1
List does not like Dir names with special characters:

Code: Select all

3.RAM Disk:> list ram:Remus/Projects/Default_Builds/
RAM:Remus/Projects/Default_Builds/40.66
RAM:Remus/Projects/Default_Builds/40.68
RAM:Remus/Projects/Default_Builds/40.70(Escom)
RAM:Remus/Projects/Default_Builds/40.70
RAM:Remus/Projects/Default_Builds/40.72(Hyperion)
3.RAM Disk:> list RAM:Remus/Projects/Default_Builds/ LFORMAT "%p%n%C" ALL
<snip>
RAM:Remus/Projects/Default_Builds/40.68/def_40.68(CD32_Ext).rpf
RAM:Remus/Projects/Default_Builds/40.68/def_40.68(CD32_Main).rpf
LIST: object not found
3.RAM Disk:>  list "RAM:Remus/Projects/Default_Builds/" LFORMAT "%p%n%C" ALL
<snip>
RAM:Remus/Projects/Default_Builds/40.68/def_40.68(CD32_Ext).rpf
RAM:Remus/Projects/Default_Builds/40.68/def_40.68(CD32_Main).rpf
LIST: object not found
3.RAM Disk:> list "RAM:Remus/Projects/Default_Builds/40.70(Escom)/" lformat "%p%n%C" all
3.RAM Disk:> 
but

Code: Select all

13.RAM Disk:> dir RAM:Remus/Projects/Default_Builds/ all
list everything, including the files in the dirs with the offending names.

and

Code: Select all

13.RAM Disk:> dir RAM:Remus/Projects/Default_Builds/40.72(Hyperion)/ all
DIR: Could not get information for "RAM:Remus/Projects/Default_Builds/40.72(Hyperion)/".
13.RAM Disk:> 
I know, there are some reserved characters one should not use. I remember reading the AmigaOS 3.1 AmigaDOS manual..
But I am not sure it is the right approach to have the user forced to travel the complete directory sturcture of files he has received or downloaded, just to hunt down offending file names.

Workbench enters the above mentioned Drawers, apparently without issues. I can do every file operation offered by WB in the Drawers with parenthesis in their name.

Don't know what priority this has, but I would like to think other users prefere to be able to use the shell for files and dirs with reserved chars too. ;)

Re: Issue with shell command "List"

Posted: Mon May 04, 2020 11:55 pm
by tonyw
This problem has been highlighted recently and I am currently taking a look at the code. The problem is that directory names have to be enclosed in quotes to preserve the "funny" characters like parentheses, commas and the like. File names are already protected.

There are many places throughout the code where quotes must be added around incoming strings (not just directory names) and each has to be checked and tested.

Then there are other commands like C:Move, etc. This is going to go on for a while.