New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AFaust opened this Issue Jan 5, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@AFaust
Collaborator

AFaust commented Jan 5, 2018

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 added a commit that referenced this issue Mar 24, 2018

Unit tests for FileContentStore + #10
- changed file content store operations to primarily use java.nio.file API
- test wrt. symbolic links does work on Windows-based systems
- minor changes / additions to existing unit tests
- cleanup of comments of little value
- addition of some debug/trace logging
@AFaust

This comment has been minimized.

Show comment
Hide comment
@AFaust

AFaust Mar 25, 2018

Collaborator

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.

Collaborator

AFaust commented Mar 25, 2018

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

This comment has been minimized.

Show comment
Hide comment
@AFaust

AFaust Apr 7, 2018

Collaborator

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

Collaborator

AFaust commented Apr 7, 2018

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

@AFaust AFaust closed this Apr 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment