[
https://issues.apache.org/jira/browse/COMPRESS-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920535#action_12920535
]
Sebb commented on COMPRESS-120:
-------------------------------
The invalid characters and filenames obviously depend on the OS, so the code
would need to either be configurable, or autodetect the host OS.
Also, note that some Java implementations (or host OSes) may automatically
convert invalid characters.
For example, OpenVMS converts aux><txt to aux__txt. Unix allows everything
except NUL and /.
However, a Windows-specific filename "cleaning" method would potentially be
useful.
The code could potentially also be useful as part of Commons IO?
> forbidden chars on windows
> --------------------------
>
> Key: COMPRESS-120
> URL: https://issues.apache.org/jira/browse/COMPRESS-120
> Project: Commons Compress
> Issue Type: Improvement
> Components: Archivers
> Affects Versions: 1.0
> Environment: WindowsXP32bit
> Reporter: Helmut M.
> Priority: Minor
>
> while uncompressing a tar archive, which includes files and directories
> containing special characters like
> private char[] forbiddenCharsWindows = new char[] { ':', '*', '?', '"', '<',
> '>', '|' }; the name of the tarEntry is corrupt
> and to create the directory or file is not possible. Exceptions occurs while
> creating them.
> it would be better to replace them with '_' instead to respond invalid
> entrynames.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.