Fix password-protected files

pull/1/head
yflory 4 years ago
parent ec5ee3eaff
commit 786568c353

@ -570,7 +570,7 @@ define([
var defaultTitle = Utils.UserObject.getDefaultName(parsed); var defaultTitle = Utils.UserObject.getDefaultName(parsed);
var edPublic, curvePublic, notifications, isTemplate; var edPublic, curvePublic, notifications, isTemplate;
var settings = {}; var settings = {};
var isSafe = ['debug', 'profile', 'drive', 'teams', 'calendar'].indexOf(currentPad.app) !== -1; var isSafe = ['debug', 'profile', 'drive', 'teams', 'calendar', 'file'].indexOf(currentPad.app) !== -1;
var isDeleted = isNewFile && currentPad.hash.length > 0; var isDeleted = isNewFile && currentPad.hash.length > 0;
if (isDeleted) { if (isDeleted) {

@ -15,8 +15,8 @@ define([
href = obj.href; href = obj.href;
hash = obj.hash; hash = obj.hash;
}).nThen(function (/*waitFor*/) { }).nThen(function (/*waitFor*/) {
var addData = function (meta, Cryptpad) { var addData = function (meta, Cryptpad, user, Utils) {
meta.filehash = Cryptpad.currentPad.hash; meta.filehash = Utils.currentPad.hash;
}; };
SFCommonO.start({ SFCommonO.start({
cache: true, cache: true,

Loading…
Cancel
Save