@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
import java.io.FileReader ;
import java.io.FileReader ;
import java.io.IOException ;
import java.io.IOException ;
import java.io.Reader ;
import java.io.Reader ;
import java.nio.file.Paths ;
import java.util.* ;
import java.util.* ;
import javax.xml.bind.JAXBContext ;
import javax.xml.bind.JAXBContext ;
@ -264,7 +265,7 @@ public class Settings {
/** Data storage path. */
/** Data storage path. */
private String dataPath = "data" ;
private String dataPath = "data" ;
/** Data storage path (for temporary data). */
/** Data storage path (for temporary data). */
private String tempDataPath = "data/_temp" ;
private String tempDataPath = null ;
/** Storage policy to indicate which data should be hosted */
/** Storage policy to indicate which data should be hosted */
private String storagePolicy = "FOLLOWED_AND_VIEWED" ;
private String storagePolicy = "FOLLOWED_AND_VIEWED" ;
@ -783,8 +784,12 @@ public class Settings {
}
}
public String getTempDataPath ( ) {
public String getTempDataPath ( ) {
if ( this . tempDataPath ! = null ) {
return this . tempDataPath ;
return this . tempDataPath ;
}
}
// Default the temp path to a "_temp" folder inside the data directory
return Paths . get ( this . getDataPath ( ) , "_temp" ) . toString ( ) ;
}
public StoragePolicy getStoragePolicy ( ) {
public StoragePolicy getStoragePolicy ( ) {
return StoragePolicy . valueOf ( this . storagePolicy ) ;
return StoragePolicy . valueOf ( this . storagePolicy ) ;