Fixed to use rename() for renaming files, not link()/unlink().
authordtrg <none@none>
Wed, 26 Jul 2006 12:40:25 +0000 (12:40 +0000)
committerdtrg <none@none>
Wed, 26 Jul 2006 12:40:25 +0000 (12:40 +0000)
modules/src/system/rename.c

index f653077..bc394be 100644 (file)
@@ -10,8 +10,6 @@ int
 sys_rename(path1, path2)
        char *path1, *path2;
 {
-       unlink(path2);
-       return  link(path1, path2) == 0 &&
-               unlink(path1) == 0;
+       return rename(path1, path2) == 0;
 }