~gl-az/percona-xtrabackup/2.1-valgrind

« back to all changes in this revision

Viewing changes to src/ds_tmpfile.c

  • Committer: Alexey Kopytov
  • Date: 2013-04-24 17:30:49 UTC
  • Revision ID: akopytov@gmail.com-20130424173049-n2840a5ouhxhxj0y
Bug #1172016: xtrabackup leaves xbtemp temp files behind Edit

The problem was a typo in tmpfile_open(): it should remove the newly
created temporary file rather then the not yet existing destination
file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
                /* On Windows, open files cannot be removed, but files can be
105
105
                created with the O_TEMPORARY flag to the same effect
106
106
                ("delete on close"). */
107
 
                unlink(path);
 
107
                unlink(tmp_path);
108
108
        }
109
109
#endif /* !__WIN__ */
110
110