Page 1 of 2

Problems with List command

Posted: Sun Feb 19, 2012 12:19 pm
by Amigo1
During my journey to solve a Link/Assign problem herehttp://forum.hyperion-entertainment.biz ... 8&start=10, I stumbled upon two small bugs(?) of the LIST command:

Glitch Nr. 1: List does not list files in dirs with round brackets and quits with an error.
C:List (53.1) seems to have problems with round brackets. I know round brackets are special characters which
should not be in AmigaDOS filenames, but nowadays files from other systems happen to be copied over.
For example the game "Lugaru" has some drawers with round brackets, renaming them will prevent lugaru from
working properly. Another App using round brackets is AMC (Amiga Media Centre).

eg:
- Make a new dir in RAM:
- rename it to "Rename_Me(hh)"
- then type in the following in a shell:
list ram: all

One of the appearing text lines will tell you:
LIST: No information for "RAM:Rename_Me(hh)
LIST: object not found


Glitch Nr. 2: The option LIST LFORMAT "%R" does not always work. (or is it maybe supposed to work like this?):
This is the Output of a shell:

11.AmigaOS:>CD SYS:SObjs/

11.AmigaOS:SObjs>LIST libpng.so LFORMAT "%F%N"
AmigaOS:SObjs/libpng.so

11.AmigaOS:SObjs>LIST libpng.so LFORMAT "%F%N %R"
AmigaOS:SObjs/libpng.so

11.AmigaOS:SObjs>LIST SOBJS: LFORMAT "%F%N %R"
----snip----
AmigaOS:SObjs/libpng.so SYS:sobjs/libpng12.so
----snip----


As you can see, the links are shown only if a directory is listed, but not if I list only one file.

Let's say you have to search for orphaned links. It is annoying if you do something like this:

>LIST work: ALL >RAM:testlist.txt

since it fails and quits as soon as some directory with the mentioned pattern appears.


I also noticed, only Softlinks show the path to the file they are linked to, hardlinks are not highlighted.
Mmmh.. thinking about it, it might make sense, as it is "just a node pointing to the same data", right?

Further I will quote Xenic and tonyw (hope you don't mind, and thanx for helping me out with the other issue :-), they contributed with comments which seem noteworthy:
Xenic wrote:
It's not just a problem with the LFORMAT %R option. The list command doesn't show the link if you list the file using the exact filename like "list libpng.so". If you throw a wildcard into the filename like "list libpng.s?" then the link is shown. This seems like a bug to me and should probably be reported.
tonyw wrote
This has gone off topic and deserves a new thread. However, I don't think it's a "List" or "Dir" or "Delete" problem - it looks more like a general DOS parsing problem.

Re: Problems with List command

Posted: Sat Feb 25, 2012 8:26 am
by Amigo1
'Politely asking if someone has filled a bug-report about this.

Re: Problems with List command

Posted: Sat Feb 25, 2012 8:44 am
by Slayer
I'm just looking at it now

-----/-----
6.WORK:> makedir ram:(findme)
6.WORK:> list ram: all
Directory "ram:" on Saturday 25-Feb-12
(findme) Dir ----rwed Today 20:35:52
Clipboards Dir ----rwed Today 19:58:13
T Dir ----rwed Today 20:13:27
3 directories - 6 blocks used
LIST: No information for "ram:(findme)".
LIST: object not found

TOTAL: 3 directories - 6 blocks used
6.WORK:>
-----/-----

So it does list it (of sorts) but still returns those errors

confirmed on Sam Flex AOS4.1.4 and X1000 running AOS4.1.5+

Bug Submitted

I'll leave number 2 to those who know the inner workings on this

Re: Problems with List command

Posted: Sun Feb 26, 2012 9:40 am
by Amigo1
Slayer wrote: confirmed on Sam Flex AOS4.1.4 and X1000 running AOS4.1.5+

Bug Submitted

I'll leave number 2 to those who know the inner workings on this
and if you put something in your (find me) dir, probably it won't show up, as it doesn't here.

Thanks for reporting! :)

Re: Problems with List command

Posted: Fri Nov 22, 2013 7:35 pm
by JosDuchIt
The problem above (round brackets) was reported for version 53.1

It is not solved in 53.7
It is especially ennoying when you try to do a search with pat or sub say on a partition.

I noted that the searches on my datas: partition
List pat #?.cd ALL
produced no usefull output


The filenames with round brackets were found in the AMC install.
The following results were observed

Code: Select all

.Stock:Backup_Datas> List >ram:allcd All
LIST: Aucune information pour « _Audio/AMC/Themes/Default (16-9_LessFX) ».
LIST: objet non trouvé
7.Stock:Backup_Datas/_Audio/AMC/Themes> list all
CurrentTheme.ath               2041 ----rwed 22-Jan-80 09:28:54
Default                        Rép. ----rwed 29-Oct-13 08:38:58
Default (16-9_LessFX)          Rép. ----rwed 29-Mai-12 13:55:45
Default (4-3_LessFX)           Rép. ----rwed 29-Mai-12 13:55:45
Default (4-3)                  Rép. ----rwed 29-Mai-12 13:55:44
1 fichier - 1K octet - 4 répertoires - 11 blocs utilisés

Répertoire « Default » le Vendredi 22-Nov-13

Remark:  i did not find the bug reporting mentioned in this thread.

Background.jpg_scaled        928218 ----rwed 29-Oct-13 08:39:02
PlayerScreen                   3130 ----rwed 22-Jan-80 09:28:54

.....


......
Accept.png                    17492 ----rwed 22-Jan-80 09:28:54
Abort.png                     15517 ----rwed 22-Jan-80 09:28:54
53 fichiers - 823K octets - 905 blocs utilisés
LIST: Aucune information pour « Default (16-9_LessFX) ».
LIST: objet non trouvé

TOTAL : 91 fichiers - 4837K octets - 5 répertoires - 4987 blocs utilisés

7.Stock:Backup_Datas/_Audio/AMC> list pat #?.wav all LFORMAT "%P%N"
Data/J02.wav
Data/J01.wav
LIST: objet non trouvé
Further investigation of problems that list encountered were

LIST: Aucune information pour « Cinnamon_Writer_0.801/Dictionary/English|en-uk ».
LIST: argument incorrect

Re: Problems with List command

Posted: Fri Nov 22, 2013 11:27 pm
by tonyw
There are several issues here, in different components.

The first one (which is common to all components) is that DOS seems to skip (or abort) pattern matching when it comes to a parenthesis. I can't remember whether this is intended behaviour or not. I do remember that it has been known about for years.

[edit] "Round" brackets (parentheses) are not allowed in filenames. They are reserved characters. End of story [/edit]

There are other problems with C:List and C:Delete (and many other components of that age). They all need to be updated to comply with the latest DOS API.

Re: Problems with List command

Posted: Sat Nov 23, 2013 6:13 am
by my_pc_is_amiga
Abbreviated quote from my AmigaOS 3.1 DOS manual:

"Colon (:) and slashes (/) are reserved and cannot be used in directory or filenames. Semicolons (;), ... paranetheses (()), ... are not reserved; however we recommend that you do not use these charactaers ... becasue they have special meaning in AmigaDOS."

Re: Problems with List command

Posted: Sat Nov 23, 2013 6:33 am
by my_pc_is_amiga
Just a FYI -- I was trying the list 43.4 on my os3.9 machine with the Rename_Me(hh) directory in ram: and didn't get the error message.

Edit: But also 43.4 didn't go into the Rename_Me(hh) directory with "list all" to list the files in that dir.

Re: Problems with List command

Posted: Sat Nov 23, 2013 10:51 am
by JosDuchIt
@Tonyw
There are several issues here, in different components.
- I can confirm that,
i couldn't rename them
i couldn't copy them
i couldn't delete them
Moving them globally in their folder works probably, anyway i could do that using filer, but then filer allowed me to rename, copy and delete them too

- What is the official status of the "|" character as in « Cinnamon_Writer_0.801/Dictionary/English|en-uk ». ?

The litigious files appeared on my HD mostly using Unarc on some archives. Probably some too downloading a website, using WGet.
There is also no warning for system editors (notepad tested) that you are saving under an illegal name.
The curious thing is this ( note i did set settings to create icons)
- when i compose a litigious name to save under, Notepad accepts it and list recognizes it correctly
- i can type in the exact litigious names i did find on my HD and save them to ram: or a subfolder: list will acceppt them
- when i save to ram: the folders in which i did find the litigious name "list"chokes on it

Re: Problems with List command

Posted: Sat Nov 23, 2013 11:39 pm
by colinw
There are certain characters used in pattern matching, namely the ones found in the autodoc for DOS/ParsePattern().
None of which are specifically "forbidden" in filesystem object names, but their use will eventually cause you a world of hurt.


Here are the current pattern matching tokens:

? Matches a single character.

# Matches the following expression 0 or more times.

(ab|cd) Matches any one of the items seperated by '|'.

~ Negates the following expression. It matches all strings
that do not match the expression (aka ~(foo) matches all
strings that are not exactly "foo").

[abc] Character class: matches any characters in the class.

[~bc] Character class: matches any characters not in the class.

a-z Character range (only within character classes).

% Matches 0 characters always. Useful as in "(foo|bar|%)".

* Synonym for "#?", not available by default in 2.0+
Available as an option that can be turned on. (Re; DOS prefs)

' The single quote character neutralizes the special meaning
of a special character. Here are some examples:
'#'? matches only the literal string "#?"
'?(A|B|%)'# matches the literal strings "?#", "?A#", "?B#"


Any of the above characters used in a pattern name usually cause "issues" and requires the use of the
neutralizing character ' to disarm them when part of a filesystem object name itself.