what does the spec say about file paths that are too long?
Alan Snyder
javalists at cbfiddle.com
Thu Aug 19 21:52:54 UTC 2021
I’ve been looking for some specification of what happens when a file request is made using a path that is too long (whatever that means to the underlying system).
I have not found one.
Is there one?
My opinion is that silent truncation should not happen. Instead, an exception should be thrown.
I have had the misfortunate of using an application (not Java) that did not check path lengths and the OS truncated the paths.
The result was a kind of corruption to an implied schema causing incorrect search results and potentially data loss.
Writing defensively to protect against silent path truncation is probably quite challenging, as well as tedious,
especially when working with a system-independent API.
If it is not already covered, I would like to see the specification mandate exceptions instead of silent truncation.
More information about the core-libs-dev
mailing list