[xiph-cvs] cvs commit: vorbis-tools/vorbiscomment vcomment.c
Michael Smith
msmith at xiph.org
Sun Jan 27 17:54:50 PST 2002
msmith 02/01/27 17:54:50
Modified: vorbiscomment vcomment.c
Log:
Stop segher from complaining.
Revision Changes Path
1.22 +8 -6 vorbis-tools/vorbiscomment/vcomment.c
Index: vcomment.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/vorbiscomment/vcomment.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- vcomment.c 2002/01/27 05:34:54 1.21
+++ vcomment.c 2002/01/28 01:54:50 1.22
@@ -1,7 +1,7 @@
/* This program is licensed under the GNU General Public License,
* version 2, a copy of which is included with this program.
*
- * (c) 2000-2001 Michael Smith <msmith at labyrinth.net.au>
+ * (c) 2000-2002 Michael Smith <msmith at labyrinth.net.au>
* (c) 2001 Ralph Giles <giles at ashlu.bc.ca>
*
* Front end to show how to use vcedit;
@@ -493,11 +493,13 @@
/* Some platforms fail to rename a file if the new name already exists,
* so we need to remove, then rename. How stupid.
*/
- if(remove(p->infilename))
- fprintf(stderr, "Error removing old file %s\n", p->infilename);
- if(rename(p->outfilename, p->infilename))
- fprintf(stderr, "Error renaming %s to %s\n", p->outfilename,
- p->infilename);
+ if(rename(p->outfilename, p->infilename)) {
+ if(remove(p->infilename))
+ fprintf(stderr, "Error removing old file %s\n", p->infilename);
+ else if(rename(p->outfilename, p->infilename))
+ fprintf(stderr, "Error renaming %s to %s\n", p->outfilename,
+ p->infilename);
+ }
}
}
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list