src/archiver_lzma.c
changeset 1327 998351d485d9
parent 1326 ac0fac4fe6d6
child 1328 a5314f07614a
equal deleted inserted replaced
1326:ac0fac4fe6d6 1327:998351d485d9
   637 static int LZMA_mkdir(void *opaque, const char *name)
   637 static int LZMA_mkdir(void *opaque, const char *name)
   638 {
   638 {
   639     BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
   639     BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
   640 } /* LZMA_mkdir */
   640 } /* LZMA_mkdir */
   641 
   641 
   642 static int LZMA_stat(void *opaque, const char *filename,
   642 static int LZMA_stat(void *opaque, const char *filename, PHYSFS_Stat *stat)
   643                      int *exists, PHYSFS_Stat *stat)
       
   644 {
   643 {
   645     const LZMAarchive *archive = (const LZMAarchive *) opaque;
   644     const LZMAarchive *archive = (const LZMAarchive *) opaque;
   646     const LZMAfile *file = lzma_find_file(archive, filename);
   645     const LZMAfile *file = lzma_find_file(archive, filename);
   647 
   646 
   648     *exists = (file != 0);
       
   649     if (!file)
   647     if (!file)
   650         return 0;
   648         return 0;
   651 
   649 
   652     if(file->item->IsDirectory)
   650     if(file->item->IsDirectory)
   653     {
   651     {
   697     LZMA_stat                /* stat() method           */
   695     LZMA_stat                /* stat() method           */
   698 };
   696 };
   699 
   697 
   700 #endif  /* defined PHYSFS_SUPPORTS_7Z */
   698 #endif  /* defined PHYSFS_SUPPORTS_7Z */
   701 
   699 
   702 /* end of lzma.c ... */
   700 /* end of archiver_lzma.c ... */
   703 
   701