[PATCH] Time and seek optimizations
[fio.git] / filesetup.c
index 50434e641b7af1cbc9617c50c75e27e1a2cde0f1..21854a9739747bb1f5bd16d95e034116d5b7c170 100644 (file)
@@ -434,7 +434,8 @@ void close_files(struct thread_data *td)
        int i;
 
        for_each_file(td, f, i) {
-               if (td->unlink && td->filetype == FIO_TYPE_FILE) {
+               if (!td->filename && td->unlink &&
+                   td->filetype == FIO_TYPE_FILE) {
                        unlink(f->file_name);
                        free(f->file_name);
                        f->file_name = NULL;