diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-02-07 15:53:42 +0400 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-02-10 15:41:45 +0400 |
commit | 48bb8aeb017b0d9b04e40d589a8bd93267b186e7 (patch) | |
tree | 8a952bf168138f3080b2dca7f7cbbb26a048cce6 /apps/files | |
parent | fd32501fe05bfecbdb2d5db4f95c4c828dbe474f (diff) |
Only add files to file list when uploading to current directory
Fix Issue #6683
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/upload.php | 6 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index bdaf6a77d14..c45355c6685 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -137,7 +137,8 @@ if (strpos($dir, '..') === false) { 'originalname' => $files['tmp_name'][$i], 'uploadMaxFilesize' => $maxUploadFileSize, 'maxHumanFilesize' => $maxHumanFileSize, - 'permissions' => $meta['permissions'] & $allowedPermissions + 'permissions' => $meta['permissions'] & $allowedPermissions, + 'directory' => \OC\Files\Filesystem::normalizePath(stripslashes($dir)), ); } @@ -164,7 +165,8 @@ if (strpos($dir, '..') === false) { 'originalname' => $files['tmp_name'][$i], 'uploadMaxFilesize' => $maxUploadFileSize, 'maxHumanFilesize' => $maxHumanFileSize, - 'permissions' => $meta['permissions'] & $allowedPermissions + 'permissions' => $meta['permissions'] & $allowedPermissions, + 'directory' => \OC\Files\Filesystem::normalizePath(stripslashes($dir)), ); } } diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 66968ab54c7..086810c0812 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -895,8 +895,8 @@ $(document).ready(function() { data.context.find('td.filesize').text(humanFileSize(size)); } else { - // only append new file if dragged onto current dir's crumb (last) - if (data.context && data.context.hasClass('crumb') && !data.context.hasClass('last')) { + // only append new file if uploaded into the current folder + if (file.directory !== FileList.getCurrentDirectory()) { return; } |