diff options
author | Thomas White <taw@physics.org> | 2021-03-04 13:21:45 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-03-04 13:21:45 +0100 |
commit | bbb08bef7ede9050c23a0309475d170a68631d6e (patch) | |
tree | f369e340d6857f8f7f83d899686fb87e6502727c /src | |
parent | 6ebf9236668e365f836da7b4eee75cce74ba25d2 (diff) |
GUI: When starting indexing, prefix relative filenames with ../
Diffstat (limited to 'src')
-rw-r--r-- | src/gui_backend_local.c | 6 | ||||
-rw-r--r-- | src/gui_backend_slurm.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c index bc5d3ad0..829909ac 100644 --- a/src/gui_backend_local.c +++ b/src/gui_backend_local.c @@ -108,7 +108,11 @@ static int write_file_list(GFile *workdir, if ( fh == NULL ) return 1; for ( i=0; i<n_frames; i++ ) { - fprintf(fh, "%s", filenames[i]); + if ( filenames[i][0] != '/' ) { + fprintf(fh, "../%s", filenames[i]); + } else { + fprintf(fh, "%s", filenames[i]); + } if ( events[i] != NULL ) { fprintf(fh, " %s\n", events[i]); } else { diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c index bb415c87..f9e5d0a1 100644 --- a/src/gui_backend_slurm.c +++ b/src/gui_backend_slurm.c @@ -547,7 +547,11 @@ static void write_partial_file_list(GFile *workdir, (i<(j+1)*block_size) && (i<n_frames); i++ ) { - fprintf(fh, "%s", filenames[i]); + if ( filenames[i][0] != '/' ) { + fprintf(fh, "../%s", filenames[i]); + } else { + fprintf(fh, "%s", filenames[i]); + } if ( events[i] != NULL ) { fprintf(fh, " %s\n", events[i]); } else { |