Bug with FAT32: it is impossible to capture from such a FS (Windows)

  • maxpat78

    maxpat78 - 2013-04-03

    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!

  • synchronicity

    synchronicity - 2013-04-03

    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.

  • maxpat78

    maxpat78 - 2013-04-04

    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).

  • synchronicity

    synchronicity - 2013-04-04

    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.

  • maxpat78

    maxpat78 - 2013-04-04

    I know, but there was a Python misrepresentation of -1 in my code which fed FindNextStream with an invalid handle, so crashing the app.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks