summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-23 16:16:46 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-23 16:16:46 +0200
commit7424f3aef6ecdb1b62f4ab4ff0d23ade9011ad77 (patch)
treee9cf72f3d6813d564baa9c286d0461afd0a27b34 /apps/files/index.php
parent707bd68bb4e77b4184b578699d508750653e2d42 (diff)
parentab944094e2c0c9d063cc363a81dbe517c259a466 (diff)
downloadnextcloud-server-7424f3aef6ecdb1b62f4ab4ff0d23ade9011ad77.tar.gz
nextcloud-server-7424f3aef6ecdb1b62f4ab4ff0d23ade9011ad77.zip
merge master into filesystem
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index b02aaf81c0f..c3e174d12cf 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -36,7 +36,7 @@ if(!isset($_SESSION['timezone'])) {
}
OCP\App::setActiveNavigationEntry( 'files_index' );
// Load the files
-$dir = isset( $_GET['dir'] ) ? stripslashes($_GET['dir']) : '';
+$dir = isset( $_GET['dir'] ) ? urldecode(stripslashes($_GET['dir'])) : '';
// Redirect if directory does not exist
if(!\OC\Files\Filesystem::is_dir($dir.'/')) {
header('Location: '.$_SERVER['SCRIPT_NAME'].'');
@@ -85,7 +85,7 @@ $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
-$freeSpace=\OC\Files\Filesystem::free_space('/');
+$freeSpace=\OC\Files\Filesystem::free_space($dir);
$freeSpace=max($freeSpace,0);
$maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);