You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Cormac Blackwell (JIRA)" <ji...@apache.org> on 2008/12/15 17:19:44 UTC

[jira] Created: (IO-187) FileSystemUtils.freeSpaceKb doesn't work with relative paths

FileSystemUtils.freeSpaceKb doesn't work with relative paths
------------------------------------------------------------

                 Key: IO-187
                 URL: https://issues.apache.org/jira/browse/IO-187
             Project: Commons IO
          Issue Type: Bug
          Components: Utilities
    Affects Versions: 1.4, 1.3.2, 1.3.1, 1.3, 1.2
         Environment: Linux
            Reporter: Cormac Blackwell


Calling FileSystemUtils.freeSpaceKb with ".", "./", "../", "../foo" etc. will result in an empty string being passed to df.
freeSpaceKb calls FileNameUtils.normalize on the path which destroys relative paths.

I don't see any need to normalize the path so the fix is simply to remove that call.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IO-187) FileSystemUtils.freeSpaceKb doesn't work with relative paths on Linux

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved IO-187.
---------------------

    Resolution: Fixed

Agreed - the path normalisation is unnecessary on Unix.
[It's probably unnecessary on Windows as well]

URL: http://svn.apache.org/viewvc?rev=919687&view=rev
Log:
IO-187 FileSystemUtils.freeSpaceKb doesn't work with relative paths on Linux


> FileSystemUtils.freeSpaceKb doesn't work with relative paths on Linux
> ---------------------------------------------------------------------
>
>                 Key: IO-187
>                 URL: https://issues.apache.org/jira/browse/IO-187
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.2, 1.3, 1.3.1, 1.3.2, 1.4
>         Environment: Linux
>            Reporter: Cormac Blackwell
>
> Calling FileSystemUtils.freeSpaceKb with ".", "./", "../", "../foo" etc. will result in an empty string being passed to df.
> freeSpaceKb calls FileNameUtils.normalize on the path which destroys relative paths.
> I don't see any need to normalize the path so the fix is simply to remove that call.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IO-187) FileSystemUtils.freeSpaceKb doesn't work with relative paths on Linux

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated IO-187:
--------------------

    Summary: FileSystemUtils.freeSpaceKb doesn't work with relative paths on Linux  (was: FileSystemUtils.freeSpaceKb doesn't work with relative paths)

> FileSystemUtils.freeSpaceKb doesn't work with relative paths on Linux
> ---------------------------------------------------------------------
>
>                 Key: IO-187
>                 URL: https://issues.apache.org/jira/browse/IO-187
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.2, 1.3, 1.3.1, 1.3.2, 1.4
>         Environment: Linux
>            Reporter: Cormac Blackwell
>
> Calling FileSystemUtils.freeSpaceKb with ".", "./", "../", "../foo" etc. will result in an empty string being passed to df.
> freeSpaceKb calls FileNameUtils.normalize on the path which destroys relative paths.
> I don't see any need to normalize the path so the fix is simply to remove that call.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.