GPFault 0 Report post Posted July 4, 2006 Hi! In whatsnew.txt for 2.15.8835 there is [-] W32 !: sometimes returned crap (Dandv) [A] -> lfn.lGetShortFileName had no error handling (usermenu.MakeString) Unfortunately, it is not completely fixed For names longer then 12 symbols on NTFS volumes with disabled short names !: macro return garbage. (NDN 2.15.9289 w32, tested in win2003 SP1 and winXP SP1) To reproduce: Disable 8.3 name creation on NTFS (set HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation to 1) <maybe you need to reboot here> Create file with name longer than 12 symbols try to expand !: macro for such file Note: Bug do not appear for files with names shorter than 13 symbols, even name isn`t 8.3 (For example 123456789012 - OK, 12345.678901 - OK), but one symbol longer and garbage appear instead of disk name. Length of garbage is correct (2 chars), and it never lead to access violation(so it seems not to be absolutely random address). The garbage is changing time to time, but not every time. Share this post Link to post Share on other sites
AngelsHolocaust 0 Report post Posted July 5, 2006 hi gpf! can you test the short filename expansion macros with this bug too? .!~ !~\ !~/ ~! i cannot try this because i have no NTFS drives to test it at the moment NDN gets the drive from the converted short filename (via Win32's GetShortPathname) i have changed this to use the standard fielname so the !: bug should be gone but i'd like to know if the complete path returned by the function is invalid thanks Stefan / AH Share this post Link to post Share on other sites
GPFault 0 Report post Posted July 5, 2006 E: is NTFS with disabled short names, C: is FAT For file E:\WIN2K3\TEMP\longfoldername\ThisIsLongName.ThisIsLongExtension i get the following: "!:" is "0+" "!/" is "\WIN2K3\TEMP\longfoldername" "!\" is "\WIN2K3\TEMP\longfoldername\" "!" is "ThisIsLongName" ".!" is ".ThisIsLongExtension" "!~/" is "" "!~\" is "" "~!" is "0+" ".!~" is "" For file C:\longfoldername\ThisIsLongName.ThisIsLongExtension i get the following: "!:" is "C:" "!/" is "\longfoldername" "!\" is "\longfoldername\" "!" is "ThisIsLongName" ".!" is ".ThisIsLongExtension" "!~/" is "\LONGFO~1" "!~\" is "\LONGFO~1\" "~!" is "thisis~1" ".!~" is ".thi" For file E:\WIN2K3\TEMP\longfoldername\shrtname.ext i get the following: "!:" is "E:" "!/" is "\WIN2K3\TEMP\longfoldername" "!\" is "\WIN2K3\TEMP\longfoldername\" "!" is "shrtname" ".!" is ".ext" "!~/" is "\WIN2K3\TEMP\longfoldername" "!~\" is "\WIN2K3\TEMP\longfoldername\" "~!" is "shrtname" ".!~" is ".ext" For file C:\longfoldername\shrtname.ext i get the following: "!:" is "C:" "!/" is "\longfoldername" "!\" is "\longfoldername\" "!" is "shrtname" ".!" is ".ext" "!~/" is "\LONGFO~1" "!~\" is "\LONGFO~1\" "~!" is "shrtname" ".!~" is ".ext" So in 2.15.9289 garbage seems to be returned only for !: and ~! Different bugs with !~/,!~\,~!,.!~ on E: seems to be ok, because short names REALLY does not exist (programs that operate with short names (for example ndn d32 with [X] Don`t use LFN) don`t see presence of such file at all). So wrong expansion of *~* macroses is not bug, because it can`t be fixed :) Share this post Link to post Share on other sites