Fix: if the chunk is already on the cache directory, no need to copy it from the shared directory
This commit is contained in:
@@ -873,7 +873,7 @@ import okhttp3.HttpUrl;
|
||||
|
||||
// chunk files are already downloaded, either on shared directory or cache directory
|
||||
for (Chunk chunk: Utils.concatWithCollection(ajob.getRendererDownload().getChunks(), ajob.getProjectDownload().getChunks())) {
|
||||
if (this.directoryManager.isSharedEnabled() && new File(this.directoryManager.getSharedPathFor(chunk)).exists()) {
|
||||
if (new File(this.directoryManager.getCachePathFor(chunk)).exists() == false && this.directoryManager.isSharedEnabled() && new File(this.directoryManager.getSharedPathFor(chunk)).exists()) {
|
||||
this.gui.status("Copying chunk from common directory");
|
||||
if (this.directoryManager.copyChunkFromSharedToCache(chunk) == false) {
|
||||
this.log.error("Error while copying " + this.directoryManager.getSharedPathFor(chunk) + " from shared downloads directory to working dir");
|
||||
|
||||
Reference in New Issue
Block a user