@@ 839-843 (lines=5) @@ | ||
836 | return $this->setError(elFinder::ERROR_FILE_NOT_FOUND); |
|
837 | } |
|
838 | ||
839 | if (! $this->options['allowChmodReadOnly']) { |
|
840 | if (! $this->attr($this->decode($hash), 'write', null, ($file['mime'] === 'directory'))) { |
|
841 | return $this->setError(elFinder::ERROR_PERM_DENIED, $file['name']); |
|
842 | } |
|
843 | } |
|
844 | ||
845 | $path = $this->decode($hash); |
|
846 | $write = $file['write']; |
|
@@ 2194-2198 (lines=5) @@ | ||
2191 | ||
2192 | if ($file && $file['name'] === $name) { // file exists and check filename for item ID based filesystem |
|
2193 | if ($this->uploadOverwrite) { |
|
2194 | if (! $file['write']) { |
|
2195 | return $this->setError(elFinder::ERROR_PERM_DENIED); |
|
2196 | } elseif ($file['mime'] == 'directory') { |
|
2197 | return $this->setError(elFinder::ERROR_NOT_REPLACE, $name); |
|
2198 | } |
|
2199 | $this->remove($test); |
|
2200 | } else { |
|
2201 | $name = $this->uniqueName($dstpath, $name, '-', false); |