Просмотр исходного кода

Temporary fix for (re)opening files in lzma archives (thanks, Sam!)

Ryan C. Gordon 16 лет назад
Родитель
Сommit
71fc15fd19
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/archiver_lzma.c

+ 1 - 0
src/archiver_lzma.c

@@ -649,6 +649,7 @@ static fvoid *LZMA_openRead(dvoid *opaque, const char *name, int *fileExists)
     BAIL_IF_MACRO(file == NULL, ERR_NO_SUCH_FILE, NULL);
     BAIL_IF_MACRO(file == NULL, ERR_NO_SUCH_FILE, NULL);
     BAIL_IF_MACRO(file->folder == NULL, ERR_NOT_A_FILE, NULL);
     BAIL_IF_MACRO(file->folder == NULL, ERR_NOT_A_FILE, NULL);
 
 
+    file->position = 0;
     file->folder->references++; // Increase refcount for automatic cleanup...
     file->folder->references++; // Increase refcount for automatic cleanup...
 
 
     return(file);
     return(file);