Revision 4725
Added by daigle almost 16 years ago
src/edu/ucsb/nceas/metacat/util/SystemUtil.java | ||
---|---|---|
386 | 386 |
*/ |
387 | 387 |
public static void storeExternalDirLocation(String externalDir) { |
388 | 388 |
if (getUserHomeDir() != null) { |
389 |
String storedBackupDirLoc = getUserHomeDir() + FileUtil.getFS() + ".metacat"
|
|
390 |
+ FileUtil.getFS() + "backup-location";
|
|
389 |
String storedBackupLocDir = getUserHomeDir() + FileUtil.getFS() + ".metacat";
|
|
390 |
String storedBackupLocFile = storedBackupLocDir + FileUtil.getFS() + "backup-location";
|
|
391 | 391 |
try { |
392 |
FileUtil.writeFile(storedBackupDirLoc, externalDir); |
|
392 |
FileUtil.createDirectory(storedBackupLocDir); |
|
393 |
FileUtil.writeFile(storedBackupLocFile, externalDir); |
|
393 | 394 |
} catch (IOException ioe) { |
394 | 395 |
logMetacat.error("I/O error while trying to write stored backup directory: " |
395 |
+ storedBackupDirLoc + " : " + ioe.getMessage());
|
|
396 |
+ storedBackupLocFile + " : " + ioe.getMessage());
|
|
396 | 397 |
} |
397 | 398 |
} else { |
398 | 399 |
logMetacat.warn("Could not write out stored backup directory." |
Also available in: Unified diff
Try to create the backup directories before creating th ebackup files.