Revision 4663
Added by daigle almost 16 years ago
src/edu/ucsb/nceas/metacat/service/PropertyService.java | ||
---|---|---|
38 | 38 |
import org.apache.log4j.Logger; |
39 | 39 |
|
40 | 40 |
import edu.ucsb.nceas.metacat.util.OrganizationUtil; |
41 |
import edu.ucsb.nceas.metacat.util.SystemUtil; |
|
41 | 42 |
import edu.ucsb.nceas.metacat.util.UtilException; |
42 | 43 |
import edu.ucsb.nceas.utilities.FileUtil; |
43 | 44 |
import edu.ucsb.nceas.utilities.GeneralPropertyException; |
... | ... | |
481 | 482 |
/** |
482 | 483 |
* Gets the backup properties directory |
483 | 484 |
* |
484 |
* TODO MCD figure out how to expand this. At least for Windows |
|
485 |
* |
|
486 | 485 |
* @return a string which holds the name of the backup directory. returns |
487 | 486 |
* null if directory could not be created. |
488 | 487 |
*/ |
489 | 488 |
public static String getBackupDir() { |
490 |
return "/var/metacat/.metacat";
|
|
489 |
return SystemUtil.discoverExternalDir() + FileUtil.getFS() + ".metacat";
|
|
491 | 490 |
} |
492 | 491 |
|
493 | 492 |
/** |
src/edu/ucsb/nceas/metacat/service/SkinPropertyService.java | ||
---|---|---|
39 | 39 |
import org.apache.log4j.Logger; |
40 | 40 |
|
41 | 41 |
import edu.ucsb.nceas.metacat.util.SkinUtil; |
42 |
import edu.ucsb.nceas.metacat.util.SystemUtil; |
|
42 | 43 |
import edu.ucsb.nceas.metacat.util.UtilException; |
43 | 44 |
import edu.ucsb.nceas.utilities.FileUtil; |
44 | 45 |
import edu.ucsb.nceas.utilities.GeneralPropertyException; |
... | ... | |
388 | 389 |
* null if directory could not be created. |
389 | 390 |
*/ |
390 | 391 |
public static String getBackupDir() { |
391 |
return "/var/metacat/.metacat";
|
|
392 |
return SystemUtil.discoverExternalDir() + FileUtil.getFS() + ".metacat";
|
|
392 | 393 |
} |
393 | 394 |
|
394 | 395 |
/** |
Also available in: Unified diff
Discover the external (backup) directory based on OS