|
@@ -321,7 +321,7 @@ discard block |
|
|
block discarded – undo |
|
321
|
321
|
$share = $this->shareMapper->find($fileInfo->getFileid(), $this->userId, str_replace('home::', '', $fileInfo->getStoragename())); |
|
322
|
322
|
|
|
323
|
323
|
// get rid of the .png or .pdf and so on |
|
324
|
|
- $fileName = substr($share->getFileTarget(), 0 , (strrpos($share->getFileTarget(), '.'))); // '/thedom.png' => '/thedom' || '/Test/thedom.png' => '/Test/thedom' |
|
|
324
|
+ $fileName = substr($share->getFileTarget(), 0, (strrpos($share->getFileTarget(), '.'))); // '/thedom.png' => '/thedom' || '/Test/thedom.png' => '/Test/thedom' |
|
325
|
325
|
|
|
326
|
326
|
// remove everything in front of and including of the first appearance of a slash from behind |
|
327
|
327
|
$fileName = substr(strrchr($fileName, "/"), 1); // '/thedom' => 'thedom' || '/Test/thedom' => 'thedom' |
|
@@ -359,7 +359,7 @@ discard block |
|
|
block discarded – undo |
|
359
|
359
|
protected function buildTarget(File $fileInfo) { |
|
360
|
360
|
try { |
|
361
|
361
|
// get rid of the .png or .pdf and so on |
|
362
|
|
- $fileName = substr($fileInfo->getName(), 0 , (strrpos($fileInfo->getName(), '.'))); // 'thedom.png' => 'thedom' |
|
|
362
|
+ $fileName = substr($fileInfo->getName(), 0, (strrpos($fileInfo->getName(), '.'))); // 'thedom.png' => 'thedom' |
|
363
|
363
|
|
|
364
|
364
|
// eliminate the file name from the path |
|
365
|
365
|
$filePath = str_replace($fileInfo->getName(), '', $fileInfo->getPath()); // 'files/Test/thedom.png' => 'files/Test/' || 'files/thedom.png' => 'files/' |