|
|
@ -109,6 +109,7 @@ define([
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var fo = FO.init(files, config);
|
|
|
|
var fo = FO.init(files, config);
|
|
|
|
|
|
|
|
var todo = function () {
|
|
|
|
fo.fixFiles();
|
|
|
|
fo.fixFiles();
|
|
|
|
if (files['CryptPad_RECENTPADS'] || !files.filesData) {
|
|
|
|
if (files['CryptPad_RECENTPADS'] || !files.filesData) {
|
|
|
|
console.log("DRIVE1: migration from RECENTPADS to filesData failed");
|
|
|
|
console.log("DRIVE1: migration from RECENTPADS to filesData failed");
|
|
|
@ -127,6 +128,8 @@ define([
|
|
|
|
&& typeof files.filesData[files.template[0]] === "object"
|
|
|
|
&& typeof files.filesData[files.template[0]] === "object"
|
|
|
|
&& !files.filesData[files.template[0]].filename;
|
|
|
|
&& !files.filesData[files.template[0]].filename;
|
|
|
|
return cb(res);
|
|
|
|
return cb(res);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
fo.migrate(todo);
|
|
|
|
}, "DRIVE1: migration and fixFiles without unsorted");
|
|
|
|
}, "DRIVE1: migration and fixFiles without unsorted");
|
|
|
|
|
|
|
|
|
|
|
|
assert(function (cb) {
|
|
|
|
assert(function (cb) {
|
|
|
@ -153,6 +156,7 @@ define([
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var fo = FO.init(files, config);
|
|
|
|
var fo = FO.init(files, config);
|
|
|
|
|
|
|
|
var todo = function () {
|
|
|
|
fo.fixFiles();
|
|
|
|
fo.fixFiles();
|
|
|
|
if (files['CryptPad_RECENTPADS'] || !files.filesData) {
|
|
|
|
if (files['CryptPad_RECENTPADS'] || !files.filesData) {
|
|
|
|
console.log("DRIVE2: migration from RECENTPADS to filesData failed");
|
|
|
|
console.log("DRIVE2: migration from RECENTPADS to filesData failed");
|
|
|
@ -180,6 +184,8 @@ define([
|
|
|
|
&& typeof files.filesData[fileId2] === "object"
|
|
|
|
&& typeof files.filesData[fileId2] === "object"
|
|
|
|
&& !files.filesData[fileId2].filename;
|
|
|
|
&& !files.filesData[fileId2].filename;
|
|
|
|
return cb(res);
|
|
|
|
return cb(res);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
fo.migrate(todo);
|
|
|
|
}, "DRIVE2: migration and fixFiles with unsorted");
|
|
|
|
}, "DRIVE2: migration and fixFiles with unsorted");
|
|
|
|
|
|
|
|
|
|
|
|
assert(function (cb) {
|
|
|
|
assert(function (cb) {
|
|
|
@ -204,6 +210,7 @@ define([
|
|
|
|
"CryptPad_RECENTPADS": []
|
|
|
|
"CryptPad_RECENTPADS": []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var fo = FO.init(files, config);
|
|
|
|
var fo = FO.init(files, config);
|
|
|
|
|
|
|
|
var todo = function () {
|
|
|
|
fo.fixFiles();
|
|
|
|
fo.fixFiles();
|
|
|
|
if (files['CryptPad_RECENTPADS'] || !files.filesData) {
|
|
|
|
if (files['CryptPad_RECENTPADS'] || !files.filesData) {
|
|
|
|
console.log("DRIVE2: migration from RECENTPADS to filesData failed");
|
|
|
|
console.log("DRIVE2: migration from RECENTPADS to filesData failed");
|
|
|
@ -231,6 +238,8 @@ define([
|
|
|
|
&& files.filesData[fileId2].filename === "Trash"
|
|
|
|
&& files.filesData[fileId2].filename === "Trash"
|
|
|
|
&& files.filesData[fileId2].href === href4;
|
|
|
|
&& files.filesData[fileId2].href === href4;
|
|
|
|
return cb(res);
|
|
|
|
return cb(res);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
fo.migrate(todo);
|
|
|
|
}, "DRIVE4: migration and fixFiles with a pad in trash not root");
|
|
|
|
}, "DRIVE4: migration and fixFiles with a pad in trash not root");
|
|
|
|
|
|
|
|
|
|
|
|
// userObject Tests
|
|
|
|
// userObject Tests
|
|
|
|