Discussion:
[mtools] mtools 3.9.9 handles special charaters wrong?
andreas thorn
2003-04-28 09:14:53 UTC
Permalink
(Sorry if this has been discussed before. I did not find any previous posting about anything relating to this except for the the recent thread about supporting japanese characters in filenames.)

I am using mattrib 3.9.9 with the batch mode attribute (-p) to modify file attributes on a FAT32 partition (Windows XP) and mattrib seems to be handling filenames containing $ incorrectly.

1) I use;
mattrib -/ -p c:* >> batchfile.sh

2) And then when I do;
sh batchfile.sh

I get alot of errors on files containing $

It seems mattrib wants to do the following;
mattrib +h "C:/windows/$NtUninstallQ327979$/spuninst/spuninst.bat"

When it really should do;
mattrib +h "C:/windows/\$NtUninstallQ327979\$/spuninst/spuninst.bat"

since $ is a special char in bash/csh

kind regards
Andreas



FORBES PICK - Professional Groupware Service
Share Calendars, Files, Contacts & Eliminate SPAM!

Click to learn more: http://www.norada.com
Alain Knaff
2003-05-24 19:05:06 UTC
Permalink
Post by andreas thorn
(Sorry if this has been discussed before. I did not find any previous
posting about anything relating to this except for the the recent thread
about supporting japanese characters in filenames.)
I am using mattrib 3.9.9 with the batch mode attribute (-p) to modify file
attributes on a FAT32 partition (Windows XP) and mattrib seems to be
handling filenames containing $ incorrectly.
1) I use;
mattrib -/ -p c:* >> batchfile.sh
2) And then when I do;
sh batchfile.sh
I get alot of errors on files containing $
It seems mattrib wants to do the following;
mattrib +h "C:/windows/$NtUninstallQ327979$/spuninst/spuninst.bat"
mcopy /etc/issue 't:$$'
mattrib +s 't:$$'
mattrib +s "T:\$\$"


The relevant piece of code was already in 3.9.8 (and possibly
earlyer).

Are you sure you aren't picking up an older version of mtools (can
happen easily if you have a self-compiled new version in
/usr/local/bin, and an older from your distribution in /usr/bin, but
/usr/bin is earlyer in the PATH). To check, to

which mattrib

and

mattrib -V

Regards,

Alain

Loading...