You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ron Gross (Created) (JIRA)" <ji...@apache.org> on 2011/12/29 11:51:30 UTC
[jira] [Created] (IO-295) FileUtils.isSymlinks misses symlink
folders
FileUtils.isSymlinks misses symlink folders
-------------------------------------------
Key: IO-295
URL: https://issues.apache.org/jira/browse/IO-295
Project: Commons IO
Issue Type: Bug
Affects Versions: 2.1
Environment: Windows 7 64 bit, Oracle Java 7
Reporter: Ron Gross
I created a symlink folder via mklink.
Then, while debugging, I noticed that FileUtils.isSymlink() returns false on this directory, while Java 7's Files.isSymbolicLink() returns true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (IO-295) FileUtils.isSymlinks misses symlink
folders
Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13228909#comment-13228909 ]
Sebb commented on IO-295:
-------------------------
At present, the method always returns false for Windows systems.
Not sure whether it's possible to detect symbolic links on Windows (except by using Java 7 of course).
> FileUtils.isSymlinks misses symlink folders
> -------------------------------------------
>
> Key: IO-295
> URL: https://issues.apache.org/jira/browse/IO-295
> Project: Commons IO
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: Windows 7 64 bit, Oracle Java 7
> Reporter: Ron Gross
>
> I created a symlink folder via mklink.
> Then, while debugging, I noticed that FileUtils.isSymlink() returns false on this directory, while Java 7's Files.isSymbolicLink() returns true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (IO-295) FileUtils.isSymlinks misses symlink
folders
Posted by "Marcos Vinícius da Silva (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcos Vinícius da Silva updated IO-295:
----------------------------------------
Attachment: IO-295.patch
I thought a, in my opinion, workaround implementation: on windows, execute a dir command on the symlink and check if it contains <SYMLINK> or <SYMLINKD> (for files and directories).
I attached a prototype patch. If the idea get accepted, I'll work to improve the patch (maybe use commons exec?).
> FileUtils.isSymlinks misses symlink folders
> -------------------------------------------
>
> Key: IO-295
> URL: https://issues.apache.org/jira/browse/IO-295
> Project: Commons IO
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: Windows 7 64 bit, Oracle Java 7
> Reporter: Ron Gross
> Attachments: IO-295.patch
>
>
> I created a symlink folder via mklink.
> Then, while debugging, I noticed that FileUtils.isSymlink() returns false on this directory, while Java 7's Files.isSymbolicLink() returns true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (IO-295) FileUtils.isSymlinks misses symlink
folders
Posted by "Marcos Vinícius da Silva (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcos Vinícius da Silva updated IO-295:
----------------------------------------
Attachment: IO-295-1.patch
A new patch.
Moved the shell execution code to a new package protected class ExecUtils.
> FileUtils.isSymlinks misses symlink folders
> -------------------------------------------
>
> Key: IO-295
> URL: https://issues.apache.org/jira/browse/IO-295
> Project: Commons IO
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: Windows 7 64 bit, Oracle Java 7
> Reporter: Ron Gross
> Attachments: IO-295-1.patch, IO-295.patch
>
>
> I created a symlink folder via mklink.
> Then, while debugging, I noticed that FileUtils.isSymlink() returns false on this directory, while Java 7's Files.isSymbolicLink() returns true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (IO-295) FileUtils.isSymlinks misses symlink
folders
Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232280#comment-13232280 ]
Sebb commented on IO-295:
-------------------------
It's far from ideal using a command shell for this, but if it is the only way it might be worth it.
The class FileSystemUtils currently uses the same approach for getting the system free space, so if it is necessary to use a shell, we can re-use the process code from that class.
> FileUtils.isSymlinks misses symlink folders
> -------------------------------------------
>
> Key: IO-295
> URL: https://issues.apache.org/jira/browse/IO-295
> Project: Commons IO
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: Windows 7 64 bit, Oracle Java 7
> Reporter: Ron Gross
> Attachments: IO-295.patch
>
>
> I created a symlink folder via mklink.
> Then, while debugging, I noticed that FileUtils.isSymlink() returns false on this directory, while Java 7's Files.isSymbolicLink() returns true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira