@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | // exit if we can't create a new file and we don't updatable existing file |
127 | 127 | $chunkInfo = \OC_FileChunking::decodeName($name); |
128 | 128 | if (!$this->fileView->isCreatable($this->path) && |
129 | - !$this->fileView->isUpdatable($this->path . '/' . $chunkInfo['name']) |
|
129 | + !$this->fileView->isUpdatable($this->path.'/'.$chunkInfo['name']) |
|
130 | 130 | ) { |
131 | 131 | throw new \Sabre\DAV\Exception\Forbidden(); |
132 | 132 | } |
@@ -139,9 +139,9 @@ discard block |
||
139 | 139 | |
140 | 140 | $this->fileView->verifyPath($this->path, $name); |
141 | 141 | |
142 | - $path = $this->fileView->getAbsolutePath($this->path) . '/' . $name; |
|
142 | + $path = $this->fileView->getAbsolutePath($this->path).'/'.$name; |
|
143 | 143 | // in case the file already exists/overwriting |
144 | - $info = $this->fileView->getFileInfo($this->path . '/' . $name); |
|
144 | + $info = $this->fileView->getFileInfo($this->path.'/'.$name); |
|
145 | 145 | if (!$info) { |
146 | 146 | // use a dummy FileInfo which is acceptable here since it will be refreshed after the put is complete |
147 | 147 | $info = new \OC\Files\FileInfo($path, null, null, [], null); |
@@ -150,11 +150,11 @@ discard block |
||
150 | 150 | |
151 | 151 | // only allow 1 process to upload a file at once but still allow reading the file while writing the part file |
152 | 152 | $node->acquireLock(ILockingProvider::LOCK_SHARED); |
153 | - $this->fileView->lockFile($path . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE); |
|
153 | + $this->fileView->lockFile($path.'.upload.part', ILockingProvider::LOCK_EXCLUSIVE); |
|
154 | 154 | |
155 | 155 | $result = $node->put($data); |
156 | 156 | |
157 | - $this->fileView->unlockFile($path . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE); |
|
157 | + $this->fileView->unlockFile($path.'.upload.part', ILockingProvider::LOCK_EXCLUSIVE); |
|
158 | 158 | $node->releaseLock(ILockingProvider::LOCK_SHARED); |
159 | 159 | return $result; |
160 | 160 | } catch (\OCP\Files\StorageNotAvailableException $e) { |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | $this->fileView->verifyPath($this->path, $name); |
187 | - $newPath = $this->path . '/' . $name; |
|
187 | + $newPath = $this->path.'/'.$name; |
|
188 | 188 | if (!$this->fileView->mkdir($newPath)) { |
189 | - throw new \Sabre\DAV\Exception\Forbidden('Could not create directory ' . $newPath); |
|
189 | + throw new \Sabre\DAV\Exception\Forbidden('Could not create directory '.$newPath); |
|
190 | 190 | } |
191 | 191 | } catch (\OCP\Files\StorageNotAvailableException $e) { |
192 | 192 | throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage()); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | throw new NotFound(); |
216 | 216 | } |
217 | 217 | |
218 | - $path = $this->path . '/' . $name; |
|
218 | + $path = $this->path.'/'.$name; |
|
219 | 219 | if (is_null($info)) { |
220 | 220 | try { |
221 | 221 | $this->fileView->verifyPath($this->path, $name); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | } |
231 | 231 | |
232 | 232 | if (!$info) { |
233 | - throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located'); |
|
233 | + throw new \Sabre\DAV\Exception\NotFound('File with name '.$path.' could not be located'); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | if ($info['mimetype'] === 'httpd/unix-directory') { |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | // (required old code) instead of "updateFile". |
290 | 290 | // |
291 | 291 | // TODO: resolve chunk file name here and implement "updateFile" |
292 | - $path = $this->path . '/' . $name; |
|
292 | + $path = $this->path.'/'.$name; |
|
293 | 293 | return $this->fileView->file_exists($path); |
294 | 294 | } |
295 | 295 | |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | throw new ServiceUnavailable('filesystem not setup'); |
384 | 384 | } |
385 | 385 | |
386 | - $destinationPath = $this->getPath() . '/' . $targetName; |
|
386 | + $destinationPath = $this->getPath().'/'.$targetName; |
|
387 | 387 | |
388 | 388 | |
389 | 389 | $targetNodeExists = $this->childExists($targetName); |
@@ -391,10 +391,10 @@ discard block |
||
391 | 391 | // at getNodeForPath we also check the path for isForbiddenFileOrDir |
392 | 392 | // with that we have covered both source and destination |
393 | 393 | if ($sourceNode instanceof Directory && $targetNodeExists) { |
394 | - throw new \Sabre\DAV\Exception\Forbidden('Could not copy directory ' . $sourceNode->getName() . ', target exists'); |
|
394 | + throw new \Sabre\DAV\Exception\Forbidden('Could not copy directory '.$sourceNode->getName().', target exists'); |
|
395 | 395 | } |
396 | 396 | |
397 | - [$sourceDir,] = \Sabre\Uri\split($sourceNode->getPath()); |
|
397 | + [$sourceDir, ] = \Sabre\Uri\split($sourceNode->getPath()); |
|
398 | 398 | $destinationDir = $this->getPath(); |
399 | 399 | |
400 | 400 | $sourcePath = $sourceNode->getPath(); |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | |
454 | 454 | public function copyInto($targetName, $sourcePath, INode $sourceNode) { |
455 | 455 | if ($sourceNode instanceof File) { |
456 | - $destinationPath = $this->getPath() . '/' . $targetName; |
|
456 | + $destinationPath = $this->getPath().'/'.$targetName; |
|
457 | 457 | $sourcePath = $sourceNode->getPath(); |
458 | 458 | |
459 | 459 | if (!$this->fileView->isCreatable($this->getPath())) { |