Skip to content

Commit

Permalink
Revert "Do not pass '.' along as path"
Browse files Browse the repository at this point in the history
This reverts commit e1b7950.
  • Loading branch information
rullzer committed Oct 11, 2018
1 parent 8954133 commit e9c6da1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,12 @@ public function fopen($path, $mode) {
case 'xb':
case 'a':
case 'ab':
$dirname = dirname($path);
if ($dirname === '.') {
$dirname = '';
}
$creatable = $this->isCreatable($dirname);
$creatable = $this->isCreatable(dirname($path));
$updatable = $this->isUpdatable($path);
// if neither permissions given, no need to continue
if (!$creatable && !$updatable) {
if (pathinfo($path, PATHINFO_EXTENSION) === 'part') {
$updatable = $this->isUpdatable($dirname);
$updatable = $this->isUpdatable(dirname($path));
}

if (!$updatable) {
Expand Down

0 comments on commit e9c6da1

Please sign in to comment.