Fix drive tests

This commit is contained in:
yflory 2018-07-20 12:04:42 +02:00
parent 8ab786e7df
commit bad1d7311a
4 changed files with 4 additions and 3 deletions

View File

@ -697,12 +697,12 @@ define([
});
};
fixSharedFolders();
fixRoot();
fixTrashRoot();
fixTemplate();
fixFilesData();
fixDrive();
fixSharedFolders();
if (JSON.stringify(files) !== before) {
debug("Your file system was corrupted. It has been cleaned so that the pads you visit can be stored safely");

View File

@ -432,6 +432,7 @@ define([
var validate = nSecret.keys.validateKey;
var crypto = Crypto.createEncryptor(nSecret.keys);
Cryptpad.getHistoryRange({
drive: cfg.isDrive,
channel: channel,
validateKey: validate,
lastKnownHash: data.lastKnownHash

View File

@ -83,7 +83,7 @@ define([
var isSharedFolder = exp.isSharedFolder = function (element) {
if (sharedFolder) { return false; } // No recursive shared folders
return Boolean(files[SHARED_FOLDERS][element]);
return Boolean(files[SHARED_FOLDERS] && files[SHARED_FOLDERS][element]);
};
var isFile = exp.isFile = function (element, allowStr) {
if (isSharedFolder(element)) { return false; }

View File

@ -70,7 +70,7 @@ define([
module.test = function (assert) {
var config = {
pinPads: Cryptpad.pinPads,
outer: true,
workgroup: false,
testMode: true,
loggedIn: false