Merge pull request #14762 from nextcloud/backport/14674/stable15

[stable15] [app:files] Use current directory for hashing.
This commit is contained in:
Morris Jobke 2019-03-20 22:30:38 +01:00 committed by GitHub
commit a5cbe94878
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -34,12 +34,11 @@
OC.FileUpload = function(uploader, data) {
this.uploader = uploader;
this.data = data;
var path = '';
var basePath = '';
if (this.uploader.fileList) {
path = OC.joinPaths(this.uploader.fileList.getCurrentDirectory(), this.getFile().name);
} else {
path = this.getFile().name;
basePath = this.uploader.fileList.getCurrentDirectory();
}
var path = OC.joinPaths(basePath, this.getFile().relativePath || '', this.getFile().name);
this.id = 'web-file-upload-' + md5(path) + '-' + (new Date()).getTime();
};
OC.FileUpload.CONFLICT_MODE_DETECT = 0;