Fix Shared FOlder issues in the drive

pull/1/head
yflory 4 years ago
parent a1ee5943b4
commit 1c986a81d1

@ -4549,6 +4549,9 @@ define([
var rEl = manager.find(restorePath); var rEl = manager.find(restorePath);
if (manager.isFile(rEl)) { if (manager.isFile(rEl)) {
restoreName = manager.getTitle(rEl); restoreName = manager.getTitle(rEl);
} else if (manager.isSharedFolder(rEl)) {
var sfData = manager.getSharedFolderData(rEl);
restoreName = sfData.title || sfData.lastTitle || Messages.fm_deletedFolder;
} else { } else {
restoreName = restorePath[1]; restoreName = restorePath[1];
} }

@ -846,7 +846,8 @@ define([
}; };
exp.ownedInTrash = function (isOwned) { exp.ownedInTrash = function (isOwned) {
return getFiles([TRASH]).map(function (id) { return getFiles([TRASH]).map(function (id) {
var data = exp.getFileData(id); var data = isSharedFolder(id) ? files[SHARED_FOLDERS][id] : exp.getFileData(id);
if (!data) { return; }
return isOwned(data.owners) ? data.channel : undefined; return isOwned(data.owners) ? data.channel : undefined;
}).filter(Boolean); }).filter(Boolean);
}; };

Loading…
Cancel
Save