diff --git a/www/drive/inner.js b/www/drive/inner.js index b6c2a51c4..7302f9bd1 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2697,25 +2697,29 @@ define([ // NOTE: Elements in the trash are not using the same storage structure as the others var _displayDirectory = function (path, force) { APP.hideMenu(); + if (!APP.editable) { debug("Read-only mode"); } if (!appStatus.isReady && !force) { return; } - // Only Trash and Root are available in not-owned files manager - if (!path || displayedCategories.indexOf(path[0]) === -1) { - log(Messages.fm_categoryError); - currentPath = [ROOT]; - _displayDirectory(currentPath); - return; + if (!path || path.length === 0) { + // Only Trash and Root are available in not-owned files manager + if (!path || displayedCategories.indexOf(path[0]) === -1) { + log(Messages.fm_categoryError); + } + if (!APP.loggedIn && APP.newSharedFolder) { + // ANON_SHARED_FOLDER + path = [SHARED_FOLDER, ROOT]; + } else { + path = [ROOT]; + } } + appStatus.ready(false); currentPath = path; var s = $content.scrollTop() || 0; $content.html(""); sel.$selectBox = $('