aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index d6b0d982..91abc9e1 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -647,7 +647,6 @@ int main(int argc, char *argv[])
ERROR("Failed to prepare indexing.\n");
return 1;
}
- rewind(fh);
gsl_set_error_handler_off();
n_images = 0;
@@ -669,8 +668,13 @@ int main(int argc, char *argv[])
pargs = worker_args[i];
- rval = fgets(line, 1023, fh);
- if ( rval == NULL ) continue;
+ if ( strlen(prepare_line) > 0 ) {
+ strcpy(line, prepare_line);
+ prepare_line[0] = '\0';
+ } else {
+ rval = fgets(line, 1023, fh);
+ if ( rval == NULL ) continue;
+ }
chomp(line);
snprintf(pargs->filename, 1023, "%s%s", prefix, line);