Merge pull request #272 from vatesfr/abhamonr-fix-smb-backup-location

Ensure remote smb path is a directory. (fix vatesfr/xo-web#865)
This commit is contained in:
Julien Fontanet 2016-04-06 16:25:28 +02:00
commit 90f0795416

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, '\\')
}