summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-24 14:15:13 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-24 14:15:13 +0800
commitae18d6ceb1b44fdd6178844eb04ac8816038ea50 (patch)
tree5491f2368b93367b0b7b8782e13b13825ee7da69
parentd365e7cace5e16046b3c5ca876d02e33c97014d2 (diff)
downloadpttbbs-ae18d6ceb1b44fdd6178844eb04ac8816038ea50.tar
pttbbs-ae18d6ceb1b44fdd6178844eb04ac8816038ea50.tar.gz
pttbbs-ae18d6ceb1b44fdd6178844eb04ac8816038ea50.tar.bz2
pttbbs-ae18d6ceb1b44fdd6178844eb04ac8816038ea50.tar.lz
pttbbs-ae18d6ceb1b44fdd6178844eb04ac8816038ea50.tar.xz
pttbbs-ae18d6ceb1b44fdd6178844eb04ac8816038ea50.tar.zst
pttbbs-ae18d6ceb1b44fdd6178844eb04ac8816038ea50.zip
Avoid overriding backup file.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2017 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/r2014convert.c8
1 files changed, 4 insertions, 4 deletions
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;