forked from External/mage
Fixed too large temp files creation for svg icons on startup
This commit is contained in:
parent
8b8392f42c
commit
09f5af154e
4 changed files with 46 additions and 22 deletions
|
|
@ -325,6 +325,7 @@ public class DeckGeneratorDialog {
|
|||
// Generated deck has a nice unique name which corresponds to the timestamp at which it was created.
|
||||
String deckName = "Generated-Deck-" + dateFormat.format(new Date());
|
||||
File tmp = new File(tempDir + File.separator + deckName + ".dck");
|
||||
tmp.getParentFile().mkdirs();
|
||||
tmp.createNewFile();
|
||||
deck.setName(deckName);
|
||||
Sets.saveDeck(tmp.getAbsolutePath(), deck.getDeckCardLists());
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public final class SaveObjectUtil {
|
|||
String time = now(DATE_PATTERN);
|
||||
File f = new File("income" + File.separator + name + '_' + time + ".save");
|
||||
if (!f.exists()) {
|
||||
f.getParentFile().mkdirs();
|
||||
f.createNewFile();
|
||||
}
|
||||
oos = new ObjectOutputStream(new FileOutputStream(f));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue