- Issue created by @Hydra
- Merge request !1493406779 Return the path from file_system if available in feed file system saveData. → (Merged) created by Hydra
- last update
over 1 year ago 712 pass - Status changed to Needs review
over 1 year ago 2:45pm 7 December 2023 - 🇩🇪Germany Hydra
I added the path returning from file_system in consideration for the return value. This this can be FALSE in theory, I added a fallback to the current behavior.
Another possible attend would be to replace the existing file. This could be achieved like that:$this->fileSystem->saveData($data, $destination, FileSystemInterface::EXISTS_REPLACE);
I'm not sure whats better.
- First commit to issue fork.
- last update
over 1 year ago 712 pass -
MegaChriz →
committed e7d3d7d4 on 8.x-3.x authored by
Hydra →
Issue #3406779 by Hydra: FeedsFileSystemBase::saveData() should return...
-
MegaChriz →
committed e7d3d7d4 on 8.x-3.x authored by
Hydra →
- Status changed to Fixed
over 1 year ago 2:58pm 14 December 2023 - 🇳🇱Netherlands megachriz
I think that the file getting renamed upon save if one already exists with the same name is safer. It looks like that
FALSE
can only be returned when the$replace
parameter ofDrupal\Core\File\FileSystemInterface::saveData()
isFileSystemInterface::EXISTS_ERROR
, but there could theoritically be different behavior for classes that override the file_system service.Using Feeds Log, I checked if the new return value was still correct and I can confirm that that was the case. I merged the code!
Automatically closed - issue fixed for 2 weeks with no activity.