Workaround gnome-vfs2-2.0.2-5 or ntfsprogs-gnomevfs-1.0.1-0 libntfs:// bug.
authorshort <>
Sun, 12 Oct 2003 11:49:30 +0000 (11:49 +0000)
committershort <>
Sun, 12 Oct 2003 11:49:30 +0000 (11:49 +0000)
 - Drivers found on unmounted NTFS disks were not acquired.

src/install/acquire/moduriload.c

index 505c647..6b2d591 100644 (file)
@@ -176,7 +176,13 @@ GnomeVFSResult errvfsresult;
                goto fail_free_file_buffer;
        /* 'bytes_read' must be !=NULL for GnomeVFS-2.0.x! */
        errvfsresult=gnome_vfs_read(handle,&file_tail_check,1,&bytes_read);
-       if (errvfsresult!=GNOME_VFS_ERROR_EOF)
+       if (!(errvfsresult==GNOME_VFS_ERROR_EOF
+                       /* At least RedHat gnome-vfs2-2.0.2-5
+                        * and ntfsprogs-200309071734-1captive1 and ntfsprogs-gnomevfs-1.0.1-0
+                        * do not report GNOME_VFS_ERROR_EOF.
+                        * FIXME: Check if it is a bug in ntfsprogs-gnomevfs-1.0.1-0.
+                        */
+                       || (errvfsresult==GNOME_VFS_OK && bytes_read==0)))
                goto fail_free_file_buffer;
        mod_uri_load_file_from_memory(file_buffer,file_info->size,uri);