aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-04 13:21:45 +0100
committerThomas White <taw@physics.org>2021-03-04 13:21:45 +0100
commitbbb08bef7ede9050c23a0309475d170a68631d6e (patch)
treef369e340d6857f8f7f83d899686fb87e6502727c /src
parent6ebf9236668e365f836da7b4eee75cce74ba25d2 (diff)
GUI: When starting indexing, prefix relative filenames with ../
Diffstat (limited to 'src')
-rw-r--r--src/gui_backend_local.c6
-rw-r--r--src/gui_backend_slurm.c6
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 {