Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1337 - MultiPartFormInputStream path resolution fix
+ We cannot determine if a String represents an absolute or relative path simply by using the String itself. We must use a Path and resolve against it, allowing the runtime JVM, its OS, its FileSystems, and its FileStore implementations to make that call. We do this by using a resolved java.nio.file.Path and asking it to resolve a new path from a provided String. This satisfies the FileStore and FileSystem requirements, and in the end pushes the call on what is relative or absolute on the FileSystem implementation. + Switched entirely to Path from File as it improves behaviors on all runtime JVMs + Using FileStore for permissions changing as File.setReadable() is broken on Windows. + Moved _location calculation to Constructor. + Eliminated .deleteOnExit() as it doesn't work on Windows (at all) and is only performed at Runtime exit on OSX. Signed-off-by: Joakim Erdfelt <[email protected]>
- Loading branch information