Skip to content
Permalink
Browse files

getProfilePath not getUserFilesPath

  • Loading branch information...
icklesteve committed Jul 27, 2019
1 parent 421967b commit b0d851d4fefae228256086212b2bfe59f38d59e1
@@ -541,7 +541,7 @@ protected void storeEventsToXml() {
}

public static class CbusEventTableXmlFile extends XmlFile {
private static String fileLocation = FileUtil.getUserFilesPath() + "cbus/"; // NOI18N
private static String fileLocation = FileUtil.getProfilePath() + "cbus/"; // NOI18N
private static String baseFileName = "EventTableData.xml"; // NOI18N

public static String getDefaultFileName() {
@@ -580,7 +580,7 @@ public static String getFileName() {
*/
public static String getFileLocation() {
if(fileLocation==null){
fileLocation = FileUtil.getUserFilesPath() + "cbus/"; // NOI18N
fileLocation = FileUtil.getProfilePath() + "cbus/"; // NOI18N
}
return fileLocation;
}
@@ -243,7 +243,7 @@ public void setUserName( String newName ) {
_nodeUserName = newName;
if (backupStarted) {
if (!thisNodeBackupFile.doStore(false) ) {
log.error("Unable to save to Node Backup File");
log.error("Unable to save Node Name to Node Backup File");
}
}
}
@@ -560,7 +560,7 @@ protected void checkNodeFinishedLoad(){

if ((!backupStarted) && totalRemainingNodeBytes() == 0) {
if (!thisNodeBackupFile.doStore(true) ) {
log.error("Unable to save to Node Backup File");
log.error("Unable to save Finished Load to Node Backup File");
}
}
// reset value if node comes online after being offline
@@ -2007,7 +2007,7 @@ public void setUserComment(String comment) {
_userComment = comment;
if (backupStarted) {
if (!thisNodeBackupFile.doStore(false) ) {
log.error("Unable to save to Node Backup File");
log.error("Unable to save User Comment to Node Backup File");
}
}
}
@@ -2490,7 +2490,9 @@ public int getNumBackups() {
* @return value else null if unknown
*/
public java.util.Date getFirstBackupTime() {
if (getNodeBackupFile() != null && getNodeBackupFile().getBackups().get(0) != null) {
if ( getNodeBackupFile() != null
&& getNodeBackupFile().getBackups() !=null
&& getNodeBackupFile().getBackups().get(0) != null ) {
return getNodeBackupFile().getBackups().get(getNodeBackupFile().getBackups().size()-1).getBackupTimeStamp();
} else {
return null;
@@ -2504,7 +2506,9 @@ public int getNumBackups() {
* @return value else null if unknown
*/
public java.util.Date getLastBackupTime() {
if (getNodeBackupFile() != null && getNodeBackupFile().getBackups().get(0) != null) {
if ( getNodeBackupFile() != null
&& getNodeBackupFile().getBackups() !=null
&& getNodeBackupFile().getBackups().get(0) != null ) {
return getNodeBackupFile().getBackups().get(0).getBackupTimeStamp();
} else {
return null;

This file was deleted.

@@ -106,7 +106,7 @@ private void doBasicLoad(){
Element root;

if (file == null) {
log.error("84: Unable to load backup file"); // NOI18N
log.debug("No backup file to load");
return;
}

@@ -230,7 +230,7 @@ public boolean doStore( boolean createNew) {
File file = x.getFile(true);

if (file == null) {
log.error("202: Unable to load backup file"); // NOI18N
log.error("233: Unable to get backup file prior to save"); // NOI18N
return false;
}

@@ -360,7 +360,7 @@ protected boolean removeNode( boolean rotate){
}

public class CbusNodeBackupFile extends XmlFile {
private String fileLocation = FileUtil.getUserFilesPath() + "cbus/nodes/"; // NOI18N
private String fileLocation = FileUtil.getProfilePath() + "cbus/nodes/"; // NOI18N
private String baseFileName = ""+_node.getNodeNumber()+".xml"; // NOI18N

public String getDefaultFileName() {

0 comments on commit b0d851d

Please sign in to comment.
You can’t perform that action at this time.