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

Daniel Sun commented on GROOVY-2681:
------------------------------------

Fixed on master; added a regression test in 
01946d03f637d283a5f9798f94cdcf217be1d5c6 
(https://github.com/apache/groovy/commit/01946d03f637d283a5f9798f94cdcf217be1d5c6).

> In-place edit (-i option) still fails across file systems.
> ----------------------------------------------------------
>
>                 Key: GROOVY-2681
>                 URL: https://issues.apache.org/jira/browse/GROOVY-2681
>             Project: Groovy
>          Issue Type: Bug
>          Components: command line processing
>    Affects Versions: 1.5.4
>         Environment: I am using Ubuntu 7.10 (Linux).
> $ groovy -v
> Groovy Version: 1.5.4 JVM: 1.6.0_03-b05
>            Reporter: Tim Heaney
>            Assignee: Daniel Sun
>            Priority: Minor
>             Fix For: 7.0.0-alpha-1
>
>
> The situation described in
>   http://jira.codehaus.org/browse/GROOVY-820
> still exists when executed from a file system different from the one on which 
> /tmp is mounted. The symptoms are exactly the same
>   $ groovy -pi -e "(line =~ 'a').replaceAll('b')" foo
>   Caught: java.io.IOException: unable to rename foo to /tmp/groovy_15520.tmp
>   $ groovy -pi.bak -e "(line =~ 'a').replaceAll('b')" foo
> If the rename fails, isn't there a way to do a copy and delete, rather than 
> just throw an exception?



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to