Merge branch 'misc/more-log' into 'master'

Better log on permission error file

See merge request sheepitrenderfarm/client!355
This commit is contained in:
Sheepit Renderfarm
2025-01-09 16:13:04 +00:00

View File

@@ -28,6 +28,8 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Random; import java.util.Random;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@@ -184,6 +186,13 @@ public class DownloadManager {
e.printStackTrace(new PrintWriter(sw)); e.printStackTrace(new PrintWriter(sw));
this.log.error("DownloadManager::createLock Unable to create .partial temp file for binary/scene " + this.local_target); this.log.error("DownloadManager::createLock Unable to create .partial temp file for binary/scene " + this.local_target);
this.log.error("DownloadManager::createLock Exception " + e + " stacktrace " + sw.toString()); this.log.error("DownloadManager::createLock Exception " + e + " stacktrace " + sw.toString());
String current_path = this.local_target;
String test_path;
while ((test_path = (new File(current_path).getParent())) != null) {
this.log.error("DownloadManager::createLock checking path info " + test_path + " exists? " + (new File(test_path).exists() ? "yes" : "no") + " is writeable? " + (Files.isWritable(Path.of(test_path)) ? "yes" : "no"));
current_path = test_path;
}
} }
} }