From ae18d6ceb1b44fdd6178844eb04ac8816038ea50 Mon Sep 17 00:00:00 2001 From: scw Date: Mon, 24 May 2004 06:15:13 +0000 Subject: Avoid overriding backup file. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2017 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/r2014convert.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/r2014convert.c b/util/r2014convert.c index 317a4623..766e6e1e 100644 --- a/util/r2014convert.c +++ b/util/r2014convert.c @@ -32,12 +32,12 @@ int main(){ } printf("Reading from " BBSHOME "/.PASSWDS\n"); - new_fd = open(BBSHOME "/PASSWDS.NEW", O_WRONLY | O_CREAT | O_TRUNC, 0600); + new_fd = open(BBSHOME "/.PASSWDS.NEW", O_WRONLY | O_CREAT | O_TRUNC, 0600); if( new_fd < 0 ){ - perror("opening " BBSHOME "/PASSWDS.NEW for writing"); + perror("opening " BBSHOME "/.PASSWDS.NEW for writing"); return 1; } - printf("Writing to " BBSHOME "/PASSWDS.NEW\n"); + printf("Writing to " BBSHOME "/.PASSWDS.NEW\n"); while(read(orig_fd, &u, sizeof(userec_t)) == sizeof(userec_t)){ // clear 0x400, 0x800, and 0x3000 @@ -56,7 +56,7 @@ int main(){ printf("Moving files....\n"); system("mv -i " BBSHOME "/.PASSWDS " BBSHOME "/.PASSWDS.old"); - system("mv -i " BBSHOME "/PASSWDS.NEW " BBSHOME "/.PASSWDS"); + system("mv -i " BBSHOME "/.PASSWDS.NEW " BBSHOME "/.PASSWDS"); printf("Done, old password file is now at " BBSHOME "/.PASSWDS.old\n"); return 0; -- cgit v1.2.3