Permalink
Browse files

Fix some small bugs and whitespace issues. Don't allow the SDCardSync…

…hronizer to remove the mobileorg.org file to keep from clobbering it
  • Loading branch information...
matburt committed May 5, 2011
1 parent 0189d2c commit 485d8849c08a35c68542878ec85151a52db88266
@@ -170,6 +170,7 @@ else if (this.actionMode.equals("create")) {
mNode.nodePayload = mBody.getText().toString();;
creator.writeNote(mNode.generateNoteEntry());
}
+ creator.close();
}
@Override
@@ -354,7 +354,7 @@ else if (thisLine.indexOf("** End of edit") != -1) {
awaitingNewVal = false;
edits.add(thisNode);
}
-
+
if (awaitingOldVal) {
thisNode.oldVal += thisLine;
}
@@ -375,7 +375,7 @@ public BufferedReader getHandle(String filename) {
try {
if (this.storageMode == null || this.storageMode.equals("internal")) {
String normalized = filename.replace("/", "_");
- this.fstream = new FileInputStream("/data/data/com.matburt.mobileorg/files/" +
+ this.fstream = new FileInputStream("/data/data/com.matburt.mobileorg/files/" +
normalized);
}
else if (this.storageMode.equals("sdcard")) {
@@ -2,6 +2,8 @@
import android.os.Bundle;
import android.preference.PreferenceActivity;
+import android.preference.Preference;
+import android.util.Log;
import com.matburt.mobileorg.R;
public class SDCardSettingsActivity extends PreferenceActivity
@@ -78,9 +78,8 @@ else if (storageMode.equals("sdcard")) {
String indexFile = this.appSettings.getString("indexFilePath", "");
File fIndexFile = new File(indexFile);
String basePath = fIndexFile.getParent();
-
+
this.appendSDCardFile(basePath + "/mobileorg.org", fileContents);
- this.removeFile("mobileorg.org");
}
private void appendSDCardFile(String path,

0 comments on commit 485d884

Please sign in to comment.