While I was fixing a bug with FindNextStream and FAT32 fs in my ImagePyX script (to test a first, rough implementation of the famous threshold filter), I've realized that wimlib-imagex for Windows fails if one tries to capture a folder from a FAT32 file system with the following message (Admin console):
Scanning "Z:/Documents/Pictures" (loading as root of WIM image)... [ERROR] Failed to look up data streams of "Z:/Documents/Pictures" [ERROR] Win32 error: Parametro non corretto.
[ERROR] Failed to build dentry tree for `Z:/Documents/Pictures'
ERROR: Exiting with error code 42:
Could not read data from a file.
You'll probably doing something that is NTFS specific!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for pointing this out. Yes, I haven't done tests on FAT yet, and it apparently does not support the Find{First,Next}Stream() API to list data streams. I assume that creating encrypted or compressed files will fail on FAT as well, so that will need to be handled as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Simply, the FindFirstStream returns -1 (and Python wanted '-1', not '0xFFFFFFFF') on FS not supporting such feature.
Yes, those streams are supported only with NTFS (and future WinFS).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, -1 is just INVALID_HANDLE_VALUE. You'd need to examine the last error code via GetLastError() to know whether the error was really due the function being unsupported by the filesystem. Exactly which error code is generally something you have to test because the error codes set by Win32 functions are sparsely documented.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
While I was fixing a bug with FindNextStream and FAT32 fs in my ImagePyX script (to test a first, rough implementation of the famous threshold filter), I've realized that wimlib-imagex for Windows fails if one tries to capture a folder from a FAT32 file system with the following message (Admin console):
Scanning "Z:/Documents/Pictures" (loading as root of WIM image)...
[ERROR] Failed to look up data streams of "Z:/Documents/Pictures"
[ERROR] Win32 error: Parametro non corretto.
[ERROR] Failed to build dentry tree for `Z:/Documents/Pictures'
ERROR: Exiting with error code 42:
Could not read data from a file.
You'll probably doing something that is NTFS specific!
Thanks for pointing this out. Yes, I haven't done tests on FAT yet, and it apparently does not support the Find{First,Next}Stream() API to list data streams. I assume that creating encrypted or compressed files will fail on FAT as well, so that will need to be handled as well.
Simply, the FindFirstStream returns -1 (and Python wanted '-1', not '0xFFFFFFFF') on FS not supporting such feature.
Yes, those streams are supported only with NTFS (and future WinFS).
Well, -1 is just INVALID_HANDLE_VALUE. You'd need to examine the last error code via GetLastError() to know whether the error was really due the function being unsupported by the filesystem. Exactly which error code is generally something you have to test because the error codes set by Win32 functions are sparsely documented.
I know, but there was a Python misrepresentation of -1 in my code which fed FindNextStream with an invalid handle, so crashing the app.