femanager icon indicating copy to clipboard operation
femanager copied to clipboard

Solve "Make it a bit less ugly" of FileService::getCombinedIdentifier()

Open julianhofmann opened this issue 2 years ago • 0 comments

There's a "@todo" in FileService::getCombinedIdentifier() for making it less ugly.

The method is only used once: in FileService::indexFile() for getting the sys_file's uid. Replacing the use of getFileObjectFromCombinedIdentifier() by retrieveFileOrFolderObject() would make FileService::getCombinedIdentifier() (and FileService::substituteFileadminFromPathAndName) unnecessary.

Pitfall: retrieveFileOrFolderObject() could theoretically return a Folder-object. By checking the fille extension before, this edge case should already avoided.

julianhofmann avatar Nov 29 '23 10:11 julianhofmann