commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (IO-100) FileUtils.touch should raise an IOException if I may not modify the file
Date Mon, 04 Dec 2006 23:37:22 GMT
     [ http://issues.apache.org/jira/browse/IO-100?page=all ]

Henri Yandell resolved IO-100.
------------------------------

    Fix Version/s: 1.3
       Resolution: Fixed

svn ci -m "Applied the fix suggested by Mirko Friedenhagen in #IO-100. This isn't something
that it's easy to write a unit test for, but it is very easy to write a platform dependent
test and show that the new code correctly throws an exception for '/etc/passwd'" src/java/org/apache/commons/io/FileUtils.java
 
Sending        src/java/org/apache/commons/io/FileUtils.java
Transmitting file data .
Committed revision 482411.

> FileUtils.touch should raise an IOException if I may not modify the file
> ------------------------------------------------------------------------
>
>                 Key: IO-100
>                 URL: http://issues.apache.org/jira/browse/IO-100
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Linux vmware-ap-mifr 2.6.4-52-default #1 Tue Jul 25 11:13:58 CEST
2006 i686 i686 i386 GNU/Linux
> [mifr@vmware-ap-mifr coms_core-trunk]$ java -version
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
>            Reporter: Mirko Friedenhagen
>             Fix For: 1.3
>
>
> The documentation states, that FileUtils.touch implements the UNIX-touch command. However
I may successfully FileUtils.touch files like /etc/passwd, which is not allowed on the shell
as normal user. 
> Looking at the implementation, you should propably raise an IOException if the returnvalue
of `file.setLastModified(System.currentTimeMillis());` is `false`.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message