mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use copyDir instead of moveDirWithContent because tmp dir may be on other disk
This commit is contained in:
+3
-6
@@ -606,12 +606,9 @@ public class AndroidSourceGeneratingBuilder extends ModuleLevelBuilder {
|
||||
success = false;
|
||||
continue;
|
||||
}
|
||||
if (!FileUtil.moveDirWithContent(tmpOutputDir, aptOutputDirectory)) {
|
||||
context.processMessage(new CompilerMessage(ANDROID_APT_COMPILER, BuildMessage.Kind.ERROR, AndroidJpsBundle
|
||||
.message("android.jps.errors.cannot.move.content", tmpOutputDir.getPath(), aptOutputDirectory.getPath())));
|
||||
success = false;
|
||||
continue;
|
||||
}
|
||||
// we use copyDir instead of moveDirWithContent here, because tmp directory may be located on other disk and
|
||||
// moveDirWithContent doesn't work for such case
|
||||
FileUtil.copyDir(tmpOutputDir, aptOutputDirectory);
|
||||
markDirtyRecursively(aptOutputDirectory, context, ANDROID_APT_COMPILER);
|
||||
}
|
||||
storage.update(module.getName(), newState);
|
||||
|
||||
@@ -122,11 +122,9 @@ public class AndroidAptCompiler implements SourceGeneratingCompiler {
|
||||
context.addMessage(CompilerMessageCategory.ERROR, "Cannot create directory " + parent.getPath(), null, -1, -1);
|
||||
continue;
|
||||
}
|
||||
if (!FileUtil.moveDirWithContent(tmpOutputDir, genRootDir)) {
|
||||
final String message = "Cannot move content from " + tmpOutputDir.getPath() + " to " + genRootPath;
|
||||
context.addMessage(CompilerMessageCategory.ERROR, message, null, -1, -1);
|
||||
continue;
|
||||
}
|
||||
// we use copyDir instead of moveDirWithContent here, because tmp directory may be located on other disk and
|
||||
// moveDirWithContent doesn't work for such case
|
||||
FileUtil.copyDir(tmpOutputDir, genRootDir);
|
||||
}
|
||||
results.add(aptItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user