Skip to content

Conversation

@mtbc
Copy link
Member

@mtbc mtbc commented Mar 14, 2013

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

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

@mtbc
Copy link
Member Author

mtbc commented Mar 19, 2013

Is there anything more I should do in this PR so we can clear the way for #905?

@joshmoore
Copy link
Member

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).

joshmoore added a commit that referenced this pull request Mar 21, 2013
Hide File instances from classes outside CheckedPath
@joshmoore joshmoore merged commit 389a6fe into ome:develop Mar 21, 2013
@mtbc
Copy link
Member Author

mtbc commented Mar 21, 2013

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.

@mtbc mtbc deleted the trac-10372 branch March 21, 2013 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants