diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-08-07 17:43:38 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-07 17:43:38 +0400 |
commit | be07def0afa23d234ce7575013a8bcb7c113d5d1 (patch) | |
tree | a1a40331c5e71b21b66f4ac96746ca7864b67271 /apps | |
parent | 2c192a1b76a3526e9456e3f579dc5ef31f1208f2 (diff) |
Prevent folder upload causing unexpected behavior
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/file-upload.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 93da4bba935..b25755edd1c 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -231,7 +231,7 @@ $(document).ready(function() { data.errorThrown = errorMessage; } - if (file.type === '' && file.size === 4096) { + if ((file.type === '' && file.size === 4096) || file.relativePath) { data.textStatus = 'dirorzero'; data.errorThrown = t('files', 'Unable to upload {filename} as it is a directory or has 0 bytes', {filename: file.name} |