You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/04/25 20:45:00 UTC

[jira] [Commented] (IO-545) FilenameUtils.getFullPath incorrectly parses file names that begin with a tilde

    [ https://issues.apache.org/jira/browse/IO-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17716440#comment-17716440 ] 

Gary D. Gregory commented on IO-545:
------------------------------------

Note that "~" is a legal character in a file name in Windows, for example "~.txt"

> FilenameUtils.getFullPath incorrectly parses file names that begin with a tilde
> -------------------------------------------------------------------------------
>
>                 Key: IO-545
>                 URL: https://issues.apache.org/jira/browse/IO-545
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.4, 2.5
>         Environment: OpenJDK Runtime Environment (build 1.8.0_92-b14)
> FreeBSD 10.0-RELEASE-p11
>            Reporter: J.P.
>            Priority: Minor
>
> For any file with a name that begins with a tilde, which is a valid file name in BSD and Windows, if you call FilenameUtils.getFullPath and pass the file name, it returns the file name followed by a path separator. It should return an empty string. It seems to be parsing it as a unix user directory because it starts with the tilde.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)