]> wimlib.net Git - wimlib/blobdiff - src/win32.c
Win32: Do not create lookup table entries for 0 length streams
[wimlib] / src / win32.c
index 10f28b3d91280106d4955526f30bc8b10ddf0203..1b2aeffe597189f77396dd2a864a5ec54262c943 100644 (file)
@@ -876,6 +876,12 @@ win32_capture_stream(const wchar_t *path,
                }
        }
 
                }
        }
 
+       /* If zero length stream, no lookup table entry needed. */
+       if ((u64)dat->StreamSize.QuadPart == 0) {
+               ret = 0;
+               goto out;
+       }
+
        /* Create a UTF-16LE string @spath that gives the filename, then a
         * colon, then the stream name.  Or, if it's an unnamed stream, just the
         * filename.  It is MALLOC()'ed so that it can be saved in the
        /* Create a UTF-16LE string @spath that gives the filename, then a
         * colon, then the stream name.  Or, if it's an unnamed stream, just the
         * filename.  It is MALLOC()'ed so that it can be saved in the