archivers/zip.c
changeset 894 6d152b4900ea
parent 852 9467e96abdf1
child 895 8bf07c014a43
equal deleted inserted replaced
893:dd6a14b4b96d 894:6d152b4900ea
   834 
   834 
   835     return(retval);
   835     return(retval);
   836 } /* zip_version_does_symlinks */
   836 } /* zip_version_does_symlinks */
   837 
   837 
   838 
   838 
   839 static int zip_entry_is_symlink(ZIPentry *entry)
   839 static int zip_entry_is_symlink(const ZIPentry *entry)
   840 {
   840 {
   841     return((entry->resolved == ZIP_UNRESOLVED_SYMLINK) ||
   841     return((entry->resolved == ZIP_UNRESOLVED_SYMLINK) ||
   842            (entry->resolved == ZIP_BROKEN_SYMLINK) ||
   842            (entry->resolved == ZIP_BROKEN_SYMLINK) ||
   843            (entry->symlink));
   843            (entry->symlink));
   844 } /* zip_entry_is_symlink */
   844 } /* zip_entry_is_symlink */
  1291 
  1291 
  1292 
  1292 
  1293 static int ZIP_isSymLink(dvoid *opaque, const char *name, int *fileExists)
  1293 static int ZIP_isSymLink(dvoid *opaque, const char *name, int *fileExists)
  1294 {
  1294 {
  1295     int isDir;
  1295     int isDir;
  1296     ZIPentry *entry = zip_find_entry((ZIPinfo *) opaque, name, &isDir);
  1296     const ZIPentry *entry = zip_find_entry((ZIPinfo *) opaque, name, &isDir);
  1297     *fileExists = ((isDir) || (entry != NULL));
  1297     *fileExists = ((isDir) || (entry != NULL));
  1298     BAIL_IF_MACRO(entry == NULL, NULL, 0);
  1298     BAIL_IF_MACRO(entry == NULL, NULL, 0);
  1299     return(zip_entry_is_symlink(entry));
  1299     return(zip_entry_is_symlink(entry));
  1300 } /* ZIP_isSymLink */
  1300 } /* ZIP_isSymLink */
  1301 
  1301