Skip to content

Commit 65b46db

Browse files
authored
Merge pull request #137 from nextcloud/fix/dont-remove-prefix-from-paths
fix(IndexerJob,ScanService): Do not attempt to remove prefix from paths
2 parents 72226bf + e197769 commit 65b46db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/BackgroundJobs/IndexerJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected function index(array $files): void {
228228
$sources[] = new Source(
229229
$userIds,
230230
ProviderConfigService::getSourceId($file->getId()),
231-
substr($file->getInternalPath(), 6), // remove 'files/' prefix
231+
$file->getInternalPath(),
232232
$fileHandle,
233233
$file->getMtime(),
234234
$file->getMimeType(),

lib/Service/ScanService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function getSourceFromFile(array $mimeTypeFilter, File $node): ?Source {
114114
$providerKey = ProviderConfigService::getDefaultProviderKey();
115115
$sourceId = ProviderConfigService::getSourceId($node->getId());
116116
$userIds = $this->storageService->getUsersForFileId($node->getId());
117-
$path = substr($node->getInternalPath(), 6); // remove 'files/' prefix
117+
$path = $node->getInternalPath();
118118
return new Source(
119119
$userIds,
120120
$sourceId,

0 commit comments

Comments
 (0)