Fix an issue creating duplicate files in the drive

pull/1/head
yflory 7 years ago
parent fe202a92b4
commit cc163f83c7

@ -305,10 +305,12 @@ define([
sframeChan.on('Q_SET_PAD_TITLE_IN_DRIVE', function (newTitle, cb) { sframeChan.on('Q_SET_PAD_TITLE_IN_DRIVE', function (newTitle, cb) {
currentTitle = newTitle; currentTitle = newTitle;
setDocumentTitle(); setDocumentTitle();
var channel = parsed.type === 'file' ? Utils.Util.base64ToHex(secret.channel)
: secret.channel;
var data = { var data = {
password: password, password: password,
title: newTitle, title: newTitle,
channel: secret.channel, channel: channel,
path: initialPathInDrive // Where to store the pad if we don't have it in our drive path: initialPathInDrive // Where to store the pad if we don't have it in our drive
}; };
Cryptpad.setPadTitle(data, function (err) { Cryptpad.setPadTitle(data, function (err) {

Loading…
Cancel
Save