Acosix / alfresco-simple-content-stores

Addon to provide a set of common content store implementations and easy-to-use configuration (no Spring config)
Apache License 2.0
43 stars 19 forks source link

FileContentStore: Do not cascade-delete empty directories that are symbolic links #10

Closed AFaust closed 6 years ago

AFaust commented 6 years ago

As mentioned by Heiko Robert on IRC, the default Alfresco FileContentStore deletes empty directories even if they are symbolic links. This should not happen. Cascade-deletion should stop when a symbolic link is encountered. Since this addon provides a custom FileContentStore (based on the default), this should and can be corrected as part of this project. Since all currently supported Alfresco versions (4.0+) now require Java 7 or higher, it is safe to rely on the Java NIO features to handle symbolic links.

AFaust commented 6 years ago

Core of the issue (cascade deletion prevention on symbolically linked directories) has been addressed. Merge into 4.2/5.0 branches are pending resolution of a minor quirk found when switching file content store handling (mostly) to the java.nio.file package: deletion via java.nio.file.Files#delete(Path) does not (always) work and causes side-effects when (re-)creating directory structures for a new content file about to be written.

AFaust commented 6 years ago

Changes for handling cascade deletion have been merged into 4.2/5.0 branches.