diff --git a/nassh/js/nassh_connect_dialog.js b/nassh/js/nassh_connect_dialog.js index 73e095cdd..843505f92 100644 --- a/nassh/js/nassh_connect_dialog.js +++ b/nassh/js/nassh_connect_dialog.js @@ -438,7 +438,8 @@ nassh.ConnectDialog.prototype.mount = function() { */ nassh.ConnectDialog.prototype.unmount = function() { var options = {fileSystemId: this.currentProfileRecord_.id}; - chrome.extension.getBackgroundPage().onUnmountRequested(options, + chrome.extension.getBackgroundPage(). + nassh.sftp.fsp.onUnmountRequested(options, (success) => { this.displayMountButton_(true); }, (error) => { /* do nothing */ }); }; diff --git a/nassh/js/nassh_sftp_fsp.js b/nassh/js/nassh_sftp_fsp.js index 0a9102847..c6e80a4dd 100644 --- a/nassh/js/nassh_sftp_fsp.js +++ b/nassh/js/nassh_sftp_fsp.js @@ -98,7 +98,9 @@ nassh.sftp.fsp.readDirectory = function(directoryHandle, client, sanitizeOptions for(var i = 0; i < response.fileCount; i++) { var file = response.files[i]; - if (file.filename == '.' || file.filename == '..') { + // Skip over the file if it's a '.', '..' or link file + if (file.filename == '.' || file.filename == '..' || + file.permissions & 0x2000) { continue; } @@ -598,7 +600,7 @@ nassh.sftp.fsp.providerMethods = [ // Loop over the provider methods and link them to their handlers. if (chrome.fileSystemProvider) { - nassh.sftp.fsp.providerMethods.forEach(function(item) { - chrome.fileSystemProvider[item].addListener(nassh.sftp.fsp[item]); + nassh.sftp.fsp.providerMethods.forEach(function(provider) { + chrome.fileSystemProvider[provider].addListener(nassh.sftp.fsp[provider]); }); }