Fix share modal in anon drive

pull/1/head
yflory 5 years ago
parent c3d6b72763
commit 446a429d6b

@ -4215,8 +4215,9 @@ define([
el = manager.find(paths[0].path); el = manager.find(paths[0].path);
var parsed, modal; var parsed, modal;
var friends = common.getFriends(); var friends = common.getFriends();
var anonDrive = manager.isPathIn(currentPath, [FILES_DATA]) && !APP.loggedIn;
if (manager.isFolder(el) && !manager.isSharedFolder(el)) { // Folder if (manager.isFolder(el) && !manager.isSharedFolder(el) && !anonDrive) { // Folder
// if folder is inside SF // if folder is inside SF
if (manager.isInSharedFolder(paths[0].path)) { if (manager.isInSharedFolder(paths[0].path)) {
return void UI.alert(Messages.convertFolderToSF_SFParent); return void UI.alert(Messages.convertFolderToSF_SFParent);
@ -4254,8 +4255,12 @@ define([
}); });
} }
} else { // File or shared folder } else { // File or shared folder
var sf = manager.isSharedFolder(el); var sf = !anonDrive && manager.isSharedFolder(el);
if (anonDrive) {
data = el;
} else {
data = sf ? manager.getSharedFolderData(el) : manager.getFileData(el); data = sf ? manager.getSharedFolderData(el) : manager.getFileData(el);
}
parsed = (data.href && data.href.indexOf('#') !== -1) ? Hash.parsePadUrl(data.href) : {}; parsed = (data.href && data.href.indexOf('#') !== -1) ? Hash.parsePadUrl(data.href) : {};
var roParsed = Hash.parsePadUrl(data.roHref); var roParsed = Hash.parsePadUrl(data.roHref);
var padType = parsed.type || roParsed.type; var padType = parsed.type || roParsed.type;

Loading…
Cancel
Save