Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-08-07 17:43:38 +0400
committerRobin Appelman <icewind@owncloud.com>2014-08-07 17:43:38 +0400
commitbe07def0afa23d234ce7575013a8bcb7c113d5d1 (patch)
treea1a40331c5e71b21b66f4ac96746ca7864b67271 /apps
parent2c192a1b76a3526e9456e3f579dc5ef31f1208f2 (diff)
Prevent folder upload causing unexpected behavior
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/file-upload.js2
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}