From e044c35ad7250ff53acb613b55c2aaba3ba40ee6 Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Thu, 22 Aug 2019 21:34:34 +0200 Subject: [PATCH] Fix: all the directory cannot be removed because blender will reload some file even if the rendering has started --- src/com/sheepit/client/Client.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/sheepit/client/Client.java b/src/com/sheepit/client/Client.java index f6b0716..72326ce 100644 --- a/src/com/sheepit/client/Client.java +++ b/src/com/sheepit/client/Client.java @@ -570,7 +570,7 @@ public class Client { return Error.Type.NO_SPACE_LEFT_ON_DEVICE; } - File scene_file = new File(ajob.getScenePath()); + final File scene_file = new File(ajob.getScenePath()); File renderer_file = new File(ajob.getRendererPath()); if (scene_file.exists() == false) { @@ -589,7 +589,9 @@ public class Client { Observer removeSceneDirectoryOnceRenderHasStartedObserver = new Observer() { @Override public void update(Observable observable, Object o) { - removeSceneDirectory(ajob); + // only remove the .blend since it's most important data + // and it's the only file we are sure will not be needed anymore + scene_file.delete(); } };