Skip to content

Commit 9153397

Browse files
author
Mathis Koblin
committed
Removed hardcoded /fileadmin
1 parent 730774a commit 9153397

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Classes/Command/UnduplicateCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ private function findAndDeleteOldProcessedFile(int $oldFileUid): void
594594
->executeQuery();
595595
while ($record = $results->fetchAssociative()) {
596596
// delete each file from file system
597-
$this->output->writeln('<info>Deleting processed file ' . $record['identifier'] . '</info>');
598597
$this->deleteProcessedFile($record['identifier'], $record['storage']);
599598
}
600599
// delete all records in sys_file_processedfile
@@ -612,9 +611,8 @@ private function deleteProcessedFile(mixed $identifier, int $storageId): void
612611
{
613612
$storage = $this->storageRepository->getStorageObject($storageId);
614613
$storagePath = Environment::getPublicPath() . DIRECTORY_SEPARATOR . $storage->getRootLevelFolder()->getPublicUrl();
615-
$storagePath = rtrim($storagePath, '/');
616-
//$this->output->writeln('<info>Deleting processed file ' . $storagePath . $identifier . '</info>');
617-
$file = $storagePath . $identifier;
614+
$file = rtrim($storagePath, '/') . $identifier;
615+
$this->output->writeln('<info>Deleting processed file ' . $file . '</info>');
618616
if (file_exists($file)) {
619617
unlink($file);
620618
// delete all empty parent folders

0 commit comments

Comments
 (0)