+ Uses Path.toRealPath() to satisfy requirements on both Windows and Linux respectively
This commit is contained in:
parent
9a00c038ff
commit
e8f8e6a279
|
@ -73,7 +73,17 @@ public class PathResource extends Resource
|
|||
|
||||
if(!URIUtil.equalsIgnoreEncodings(uri,path.toUri()))
|
||||
{
|
||||
return Paths.get(uri).toAbsolutePath();
|
||||
try
|
||||
{
|
||||
return Paths.get(uri).toRealPath(FOLLOW_LINKS);
|
||||
}
|
||||
catch (IOException ignored)
|
||||
{
|
||||
// If the toRealPath() call fails, then let
|
||||
// the alias checking routines continue on
|
||||
// to other techniques.
|
||||
LOG.ignore(ignored);
|
||||
}
|
||||
}
|
||||
|
||||
if (!abs.isAbsolute())
|
||||
|
|
Loading…
Reference in New Issue