-
Notifications
You must be signed in to change notification settings - Fork 103
Hide File instances from classes outside CheckedPath #881
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain a bit more about the added logic here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FileUtils.touch is rather complex and powerful, rather more than the equivalent Unix command which can't even create directories, and more so than people will typically want; I didn't want to pollute the CheckedPath API with it when the other operations there are more simple, common things. To avoid introducing bugs, not being sure of how much of the functionality was needed, I figured that it was safest to simply reproduce all of it; it also then accidentally doubles as a test of the CheckedPath API in use.
It's possible that FileUtils.touch was overkill for what was needed and that, in this case, the logic could be simplified; I'm honestly not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, though I'd have to go through FileUtils.touch source to figure out any functional differences. I'd appreciate if this type of change didn't just mixed in. In the future, let's put this type of change in separate commit so we can properly hash out the benefits/risks.
|
Is there anything more I should do in this PR so we can clear the way for #905? |
|
I'm still uncertain about some of these changes and haven't felt really comfortable merging. However, now this is holding up the checksum work and so I'll move it along. I've made a note to come back and review; perhaps subsequent refactorings will provide the answer(s). |
Hide File instances from classes outside CheckedPath
|
If there are integration tests I can extend or write to help probe some of the more worrisome aspects, feel free to ask. Also, @bpindelski, if you get a spare few minutes, please look over it too in case there's anything you're doubtful about my approach on. |
Fixes http://trac.openmicroscopy.org.uk/ome/ticket/10372
To test, try various things that use the server filesystem, like importing and viewing.
--no-rebase FS only