Prevent filetype disappearing
[fio.git] / filesetup.c
index 96d1b54f0a0f5bd6f6851b629e6f1e584460f5d3..8b04560907b911f8bcc7a484f71964e36d055708 100644 (file)
@@ -906,8 +906,10 @@ void dup_files(struct thread_data *td, struct thread_data *org)
 
                __f = smalloc(sizeof(*__f));
 
 
                __f = smalloc(sizeof(*__f));
 
-               if (f->file_name)
+               if (f->file_name) {
                        __f->file_name = smalloc_strdup(f->file_name);
                        __f->file_name = smalloc_strdup(f->file_name);
+                       __f->filetype = f->filetype;
+               }
 
                td->files[i] = __f;
        }
 
                td->files[i] = __f;
        }