mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
ensure dest directory exists before copying there
This commit is contained in:
@@ -493,7 +493,6 @@ public class DialogMigrateProfile {
|
||||
// working with textbox text is thread safe
|
||||
_operationLog.setText("");
|
||||
|
||||
// assumes all destination directories have been created
|
||||
int numOps = 0;
|
||||
int numSucceeded = 0;
|
||||
int numFailed = 0;
|
||||
@@ -560,6 +559,8 @@ public class DialogMigrateProfile {
|
||||
}
|
||||
|
||||
private void _copyFile(File srcFile, File destFile) throws IOException {
|
||||
destFile.getParentFile().mkdirs();
|
||||
|
||||
if (!destFile.exists()) {
|
||||
destFile.createNewFile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user