Fixed #212 Autosave should create folders

This commit is contained in:
LemADEC 2016-09-29 02:59:40 +02:00
parent d2122c74ab
commit eeeca89f1e

View file

@ -408,6 +408,15 @@ public class JumpSequencer extends AbstractSequencer {
return;
}
File file = new File(WarpDriveConfig.G_SCHEMALOCATION + "/auto");
if (!file.exists() || !file.isDirectory()) {
if (!file.mkdirs()) {
WarpDrive.logger.warn("Unable to create auto-backup folder, skipping...");
LocalProfiler.stop();
return;
}
}
try {
// Generate unique file name
SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd_HH'h'mm'm'ss's'SSS");