projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Need to prefix directory= setting before checking dir part of filename=
[fio.git]
/
options.c
diff --git
a/options.c
b/options.c
index ead31ace29c00fb88247ea82ec76502edafb582a..20549edfe5ebbadfdc64efabf9700c0bffc74d3e 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-274,8
+274,14
@@
static int check_dir(struct thread_data *td, char *fname)
{
char file[PATH_MAX], *dir;
struct stat sb;
{
char file[PATH_MAX], *dir;
struct stat sb;
+ int elen = 0;
- strcpy(file, fname);
+ if (td->o.directory) {
+ strcpy(file, td->o.directory);
+ elen = strlen(file);
+ }
+
+ sprintf(file + elen, "/%s", fname);
dir = dirname(file);
if (lstat(dir, &sb) < 0) {
dir = dirname(file);
if (lstat(dir, &sb) < 0) {