Page 1 of 2

linux apply error

Posted: Sun Nov 20, 2016 4:26 am
by core
Failed to set DOS name of "/Autorun.inf/www/FreeSkyCD.cn/KEYFree2008.." in NTFS volume
return WIMLIB_ERR_SET_SHORT_NAME

This is a deformity folder

Re: linux apply error

Posted: Sun Nov 20, 2016 4:32 am
by core
wimlib_extract_image(wim, /* WIMStruct from which to extract the image */
1, /* Image to extract */
strDevice.toStdString().c_str(), /* Directory to extract the image to */
WIMLIB_EXTRACT_FLAG_NTFS);

i

Re: linux apply error

Posted: Sun Nov 20, 2016 4:48 am
by synchronicity
Which version of wimlib and which version of NTFS-3G? Can you do 'wimlib_set_print_errors(true);' beforehand and include the error message(s)? Is the WIM file available anywhere?

Re: linux apply error

Posted: Sun Nov 20, 2016 4:52 am
by synchronicity
If you cannot provide the WIM file, the output of

Code: Select all

wimdir $WIMFILE --detailed --path="/Autorun.inf/www/FreeSkyCD.cn/KEYFree2008.."
could also be useful (replace $WIMFILE with the WIM file path).

Re: linux apply error

Posted: Sun Nov 20, 2016 5:09 am
by core
using library

fuse-2.9.6
wimlib-1.10.0.tar.gz
ntfs-3g_ntfsprogs-2016.2.22.tgz

----------------------------dump info -----------------------------------------

Full Path = "/Autorun.inf/www.FreeSkyCD.cn/KEYFree2008.."
Short Name = "KEYFRE~1"
Attributes = 0x00000010
FILE_ATTRIBUTE_DIRECTORY is set
Security Descriptor = 010004841400000024000000000000004000000001020000000000052000000020020000010500000000000515000000c5186932cda4e9d5c45ea645010200000200a0000700000000101800ff011f0001020000000000052000000020020000001b1800000000100102000000000005200000002002000000101400ff011f00010100000000000512000000001b14000000001001010000000000051200000000131800a90012000102000000000005200000002102000000101400bf01130001010000000000050b000000001b1400000001e001010000000000050b000000
Creation Time = Fri Jun 24 09:45:35 2016 UTC
Last Write Time = Fri Jun 24 09:45:35 2016 UTC
Last Access Time = Fri Jun 24 09:45:35 2016 UTC
Link Group ID = 0x0000000000000000
Link Count = 1
Unnamed data stream:
Hash = 0x0000000000000000000000000000000000000000
Uncompressed size = 0 bytes
Compressed size = 0 bytes
Offset in WIM = 0 bytes
Part Number = 0
Reference Count = 0
Flags =

Re: linux apply error

Posted: Sun Nov 20, 2016 5:29 am
by core
enable wimlib_set_print_errors(true)

error message:
[ERROR] Failed to set DOS name of "/Autorun.inf/www.FreeSkyCD.cn/KEYFree2008.." in NTFS volume: Invalid argument

Re: linux apply error

Posted: Sun Nov 20, 2016 6:01 am
by synchronicity
The problem is that NTFS-3G doesn't allow setting short names on files whose long name ends in a space or period. This differs from the Windows behavior which is to allow short names on such files. I'll try to figure out if NTFS-3G should be changed to allow this case.

I would however wonder whether that particular directory in your WIM image is *supposed* to have trailing periods. Such filenames may cause problems with software on Windows.

Re: linux apply error

Posted: Sun Nov 20, 2016 6:15 am
by core
Thank you, this folder is used to prevent autorun virus, they have developed a strange folder

Re: linux apply error

Posted: Sun Nov 20, 2016 6:22 am
by core

Re: linux apply error

Posted: Sun Nov 20, 2016 9:10 am
by synchronicity
Well, I still don't understand why the directory is named that way. Either way, I think this should be fixed, so I wrote an NTFS-3G patch to allow setting short (DOS) names on files whose long names end in a space or dot. I sent it to the NTFS-3G mailing list but I do not know when it might make it into an NTFS-3G release. I've attached the patch to this post if you want to try it out. It applies to branch edge of git://git.code.sf.net/p/ntfs-3g/ntfs-3g. Otherwise, the only other thing I could do (besides tell you to not use such a weird directory name) is to relax the error-handling behavior when setting a short name fails, issuing a warning only. Generally I've tried to avoid that kind of thing because I prefer that problems get reported and fixed as soon as possible, instead of being ignored.