Skip to content

Commit

Permalink
Adding this to the windows thing, though it's not really related
Browse files Browse the repository at this point in the history
But it probably hinges on changes and doing it here will avoid conflicts.
  • Loading branch information
devgeeks committed Sep 24, 2013
1 parent e542129 commit b8e6640
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/helpers/Migrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
var row = results.rows.item(i);
var fileInfo = window.fileHelper.fileTypeFromExtension(row.name);
// var path = row.localpath.replace(
// /^.*\/\.favorites/, "Download/SpiderOak/.favorites"
// /^.*\/\.favorites/, "Download/" + window.s("SpiderOak") + "/.favorites"
// );
var b32username = "";
if (row.source && /\/storage\/[2-7A-Z]*\//.test(row.source)) {
b32username = row.source
.replace(/^.*\/storage\/([2-7A-Z]*)\/.*/,"$1");
}
var path = "Download/SpiderOak/.favorites/" +
var path = "Download/" + window.s("SpiderOak") + "/.favorites/" +
(b32username || "anonymous") +
row.fullpath
.replace(new RegExp("^.*(share|storage)\/([A-Z2-7]*)\/"), "/$1/$2/")
Expand Down
6 changes: 3 additions & 3 deletions src/views/FilesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
}
var model = this.model;
// Start by getting the folder path
var path = "Download/SpiderOak/.favorites/" +
var path = "Download/" + s("SpiderOak") + "/.favorites/" +
(spiderOakApp.accountModel.get("b32username") || "anonymous") +
model.composedUrl(true)
.replace(new RegExp("^.*(share|storage)\/([A-Z2-7]*)\/"), "/$1/$2/")
Expand Down Expand Up @@ -373,7 +373,7 @@
}
// Keep .shared path simple.. as they are not intentially stored.
// @TODO: Clean this up periodically?
path = "Download/SpiderOak/.shared/" +
path = "Download/" + s("SpiderOak") + "/.shared/" +
(spiderOakApp.accountModel.get("b32username") || "anonymous") + "/";
this.downloadFile(model, path, function(fileEntry) {
spiderOakApp.dialogView.hide();
Expand Down Expand Up @@ -576,7 +576,7 @@
refreshFavorite: function(callback) {
var model = this.model;
// @FIXME: This should be in a function and be based on platform
var path = "Download/SpiderOak/.favorites/" +
var path = "Download/" + s("SpiderOak") + "/.favorites/" +
(spiderOakApp.accountModel.get("b32username") || "anonymous") +
model.composedUrl(true)
.replace(new RegExp("^.*(share|storage)\/([A-Z2-7]*)\/"), "/$1/$2/")
Expand Down

0 comments on commit b8e6640

Please sign in to comment.