Skip to content

Commit a5cbe94

Browse files
authored
Merge pull request #14762 from nextcloud/backport/14674/stable15
[stable15] [app:files] Use current directory for hashing.
2 parents 6fffd09 + fad5424 commit a5cbe94

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

apps/files/js/file-upload.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434
OC.FileUpload = function(uploader, data) {
3535
this.uploader = uploader;
3636
this.data = data;
37-
var path = '';
37+
var basePath = '';
3838
if (this.uploader.fileList) {
39-
path = OC.joinPaths(this.uploader.fileList.getCurrentDirectory(), this.getFile().name);
40-
} else {
41-
path = this.getFile().name;
39+
basePath = this.uploader.fileList.getCurrentDirectory();
4240
}
41+
var path = OC.joinPaths(basePath, this.getFile().relativePath || '', this.getFile().name);
4342
this.id = 'web-file-upload-' + md5(path) + '-' + (new Date()).getTime();
4443
};
4544
OC.FileUpload.CONFLICT_MODE_DETECT = 0;

0 commit comments

Comments
 (0)