Skip to content

Commit

Permalink
VOXELCOLLECTION: fixed issue #568
Browse files Browse the repository at this point in the history
the same file could come from several different archives and would have been overwritten each time - but also opened a few times
  • Loading branch information
mgerhardy committed Jan 10, 2025
1 parent 8be626c commit f36020e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/modules/voxelcollection/Downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ bool Downloader::handleArchive(const io::ArchivePtr &archive, const VoxelFile &a
subFile.license = archiveFile.license;
subFile.licenseUrl = archiveFile.licenseUrl;
subFile.thumbnailUrl = archiveFile.thumbnailUrl;
subFile.fullPath = core::string::path(core::string::extractDir(archiveFile.fullPath), f.fullPath);
subFile.fullPath = core::string::path(core::string::extractDir(archiveFile.fullPath), core::string::extractFilename(archiveFile.fullPath), f.fullPath);
subFile.downloaded = true;

if (supportedFileExtension(subFile.name)) {
Expand All @@ -184,7 +184,6 @@ bool Downloader::handleArchive(const io::ArchivePtr &archive, const VoxelFile &a
archiveFile.fullPath.c_str());
continue;
}
// TODO: remove this as we might have clashes here with existing files
if (archive->write(subFile.targetFile(), *rs)) {
files.push_back(subFile);
} else {
Expand All @@ -199,7 +198,6 @@ bool Downloader::handleArchive(const io::ArchivePtr &archive, const VoxelFile &a
archiveFile.fullPath.c_str());
continue;
}
// TODO: remove this as we might have clashes here with existing files
if (archive->write(subFile.targetFile(), *rs)) {
handleArchive(archive, subFile, files, shouldQuit);
} else {
Expand Down

0 comments on commit f36020e

Please sign in to comment.