Only create standard prototype directories if the application directory
is freshly created, i.e. empty.
This commit is contained in:
parent
e037fa0d19
commit
6ff8401512
1 changed files with 8 additions and 6 deletions
|
@ -46,12 +46,14 @@ public class TypeManager implements Runnable {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
appDir = app.appDir;
|
appDir = app.appDir;
|
||||||
// make sure the directories for the standard prototypes exist, and lament otherwise
|
// make sure the directories for the standard prototypes exist, and lament otherwise
|
||||||
for (Iterator it=standardTypes.iterator (); it.hasNext (); ) {
|
if (appDir.list().length == 0) {
|
||||||
File f = new File (appDir, (String) it.next ());
|
for (Iterator it=standardTypes.iterator (); it.hasNext (); ) {
|
||||||
if (!f.exists() && !f.mkdir ())
|
File f = new File (appDir, (String) it.next ());
|
||||||
app.logEvent ("Warning: directory "+f.getAbsolutePath ()+" could not be created.");
|
if (!f.exists() && !f.mkdir ())
|
||||||
else if (!f.isDirectory ())
|
app.logEvent ("Warning: directory "+f.getAbsolutePath ()+" could not be created.");
|
||||||
app.logEvent ("Warning: "+f.getAbsolutePath ()+" is not a directory.");
|
else if (!f.isDirectory ())
|
||||||
|
app.logEvent ("Warning: "+f.getAbsolutePath ()+" is not a directory.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
prototypes = new HashMap ();
|
prototypes = new HashMap ();
|
||||||
zipfiles = new HashMap ();
|
zipfiles = new HashMap ();
|
||||||
|
|
Loading…
Add table
Reference in a new issue