summaryrefslogtreecommitdiffstats
path: root/mbbsd/fav.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/fav.c')
-rw-r--r--mbbsd/fav.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mbbsd/fav.c b/mbbsd/fav.c
index 6b4cd316..daea0c5c 100644
--- a/mbbsd/fav.c
+++ b/mbbsd/fav.c
@@ -460,7 +460,10 @@ int fav_save(void)
"%s %s", cuser.userid, ctime(&now));
return -1;
}
- Rename(buf, buf2);
+
+ /* to avoid write failed */
+ if (dashs(buf) != 0)
+ Rename(buf, buf2);
return 0;
}