Fixed UQM not loading zipfiles, added optional downloads
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "mem.h"
|
||||
#include "uioutils.h"
|
||||
#include "uioport.h"
|
||||
#include "../log.h"
|
||||
#ifdef uio_MEM_DEBUG
|
||||
# include "memdebug.h"
|
||||
#endif
|
||||
@@ -193,6 +194,7 @@ uio_mountDir(uio_Repository *destRep, const char *mountPoint,
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
log_add (log_Info, "uio_open %s", sourcePath);
|
||||
handle = uio_open(sourceDir, sourcePath,
|
||||
((flags & uio_MOUNT_RDONLY) == uio_MOUNT_RDONLY ?
|
||||
O_RDONLY : O_RDWR)
|
||||
@@ -201,12 +203,14 @@ uio_mountDir(uio_Repository *destRep, const char *mountPoint,
|
||||
#endif
|
||||
, 0);
|
||||
if (handle == NULL) {
|
||||
log_add (log_Info, "uio_open failed for %s", sourcePath);
|
||||
// errno is set
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
handler = uio_getFileSystemHandler(fsType);
|
||||
log_add (log_Info, "uio_getFileSystemHandler %p", handler);
|
||||
if (handler == NULL) {
|
||||
if (handle)
|
||||
uio_close(handle);
|
||||
|
||||
@@ -1366,6 +1366,10 @@ zip_fillDirStructureProcessExtraFields(uio_FileBlock *fileBlock,
|
||||
gPFileData->gid = (uid_t) makeUInt16(buf[12], buf[13]);
|
||||
break;
|
||||
}
|
||||
case 0x7875: // 'Unix string UID/GID'
|
||||
// Just skip it
|
||||
break;
|
||||
|
||||
default:
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Debug: Extra field 0x%04x unsupported, "
|
||||
|
||||
@@ -464,6 +464,7 @@ mountDirZips (uio_DirHandle *dirHandle, const char *mountPoint,
|
||||
|
||||
for (i = 0; i < dirList->numNames; i++)
|
||||
{
|
||||
log_add (log_Info, "Mounting ZIP '%s'", dirList->names[i]);
|
||||
if (uio_mountDir (repository, mountPoint, uio_FSTYPE_ZIP,
|
||||
dirHandle, dirList->names[i], "/", autoMount,
|
||||
relativeFlags | uio_MOUNT_RDONLY,
|
||||
|
||||
Reference in New Issue
Block a user