Issue 5870 in pharo: [BUG] FileReference>>rename:to: causes DNU

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue 5870 in pharo: [BUG] FileReference>>rename:to: causes DNU

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug

New issue 5870 by [hidden email]: [BUG] FileReference>>rename:to:  
causes DNU
http://code.google.com/p/pharo/issues/detail?id=5870

Pharo2.0a
Latest update: #20071

| existingFile fileToRename |
        [
                existingFile := 'existingFile' asFile ensureFile.
                fileToRename := 'fileToRename' asFile ensureFile.
                self should: [ fileToRename renameTo: existingFile fullName ] raise:  
FileExists ]
                ensure: [
                        existingFile delete.
                        fileToRename delete ].

1. causes DNU
2. After DNU is fixed, doesn't raise exception, but silently replaces the  
existing file - yikes!


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker