--- a/Filename.st Fri Apr 03 19:59:40 2020 +0200
+++ b/Filename.st Fri Apr 03 20:00:47 2020 +0200
@@ -3775,18 +3775,19 @@
"Modified: / 5.5.1999 / 13:36:33 / cg"
!
-moveFileTo:newName
+moveFileTo:newNameArg
"copy the file represented by the receiver, then delete it.
This is different to renaming in case of cross device moves.
Raise an exception if not successful.
(Notice, that a rename is tried first, in case of non-cross device move)"
+ |newName|
+
+ newName := newNameArg asFilename.
[self renameTo:newName]
- on:OsError
+ on:OSErrorHolder inappropriateReferentSignal
do:[:ex |
- ex creator == OperatingSystem fileNotFoundErrorSignal ifTrue:[
- ex reject
- ].
+ "handle renames accross device boundaries (Unix. cross device link)"
self safeCopyTo:newName.
self remove
].
@@ -3810,6 +3811,8 @@
s close.
f moveTo:'./foo'
"
+
+ "Modified: / 03-04-2020 / 15:41:38 / Stefan Vogel"
!
moveTo:newNameArg