> import_imlist (rewritten)
Hi!
The new import_imlist always fails at runtime saying e.g.:
[import_imlist.so] unable to open file `villain00.png
': No such file or directory
bcos it forgets to zap the trailing newline that fgets() retains.
The attached patch fixes the problem
Thanks, it did need a rewrite.
M
--- transcode-1.0.4rc3/import/import_imlist.c 2007-07-19 20:00:55.000000000 +0100
+++ transcode-1.0.4rc3-1/import/import_imlist.c 2007-08-04 17:24:23.000000000 +0100
@@ -131,6 +131,12 @@
}
filename[PATH_MAX] = '\0'; /* enforce */
+ /* Zap the trailing newline */
+ {
+ char *cp = strchr(filename, '\n');
+ if (cp != NULL) *cp = '\0';
+ }
+
ClearMagickWand(wand);
/*
* This avoids IM to buffer all read images.