Ensure remote smb path is a directory. (fix vatesfr/xo-web#865)

This commit is contained in:
wescoeur 2016-04-06 09:49:22 +02:00
parent 332ba96d34
commit 279d0d20ea

View File

@ -54,6 +54,11 @@ export default class SmbHandler extends RemoteHandlerAbstract {
? this._remote.path
: ''
// Ensure remote path is a directory.
if (path !== '' && path[path.length - 1] !== '\\') {
path += '\\'
}
if (file) {
path += file.replace(/\//g, '\\')
}