From 3494ffb3027d91f14ca73e5cb2e6638dd6078b92 Mon Sep 17 00:00:00 2001 From: dtrg Date: Wed, 26 Jul 2006 12:40:25 +0000 Subject: [PATCH] Fixed to use rename() for renaming files, not link()/unlink(). --- modules/src/system/rename.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/src/system/rename.c b/modules/src/system/rename.c index f65307764..bc394be9b 100644 --- a/modules/src/system/rename.c +++ b/modules/src/system/rename.c @@ -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; }