-
Notifications
You must be signed in to change notification settings - Fork 101
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
fix #10175: set FilesetEntry client path to String <256 chars #1706
Conversation
If some of the used files have a shorter full path than the longest ones, this code takes the opportunity to squeeze an extra bit of depth into them. If it is important to start all the used files from the same parent, this PR could be changed accordingly. |
String fsPathString; | ||
while (true) { | ||
fsPathString = fsPath.toString(); | ||
if (fsPathString.length() < 256) { |
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.
Should this be defined as a constant/property somewhere? Or is there no point since everything else is hard-coded?
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.
I was hoping to figure out how to extract it from whatever's setting the VARCHAR(255)
on that column in the first place, but I couldn't find it.
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.
Fair enough.
Is it worth warning the user that the path was truncated? |
I don't think so: they probably won't care about the higher-up path components anyway and we already bother them with quite enough things. One could slip a ".../" at the front if you think it warranted? |
I think clientPath must be inviolate since we've sold it as the way to identify filesets despite our munging of server-side paths, even if that means we have to go to using |
NB: Another alternative would be to log all these values in a property file with the fileset:
in which `client_paths includes:
|
The main issue is the image name which is limited to 256. |
If |
I agree that we cannot truncate the |
Unacceptable approach. |
Superseded by #1710. |
Fixes http://trac.openmicroscopy.org.uk/ome/ticket/10175. To test, try importing images from absurdly long-named/deep paths. Cc: @manics.
--no-rebase as it's FS-specific.