Backslash escaping in GlobExpression()
Posted: 2010-04-22T05:17:38-07:00
Backslash escaping is completely broken in GlobExpression(). I have confirmed this in IM 6.5.1 (from Ubuntu) and I have read the code in trunk which strongly suggests that this bug continues up to the current HEAD. There is code there, but all it does is removes the character following the backslash from the pattern, it doesn't do a literal match. So this:
image\a\b\*.png
matches this:
image.png
which is presumably not intended.
This means that it is virtually impossible to process a file with a literal asterisk in its name with the convert command. Of course, any seasoned UNIX hacker knows that you shouldn't use asterisks in filenames, but our users are not universally such, and this is not a restriction we want to impose on them unless it's really necessary.
image\a\b\*.png
matches this:
image.png
which is presumably not intended.
This means that it is virtually impossible to process a file with a literal asterisk in its name with the convert command. Of course, any seasoned UNIX hacker knows that you shouldn't use asterisks in filenames, but our users are not universally such, and this is not a restriction we want to impose on them unless it's really necessary.