Question
Buglet in AdobeLibrary1.jsx
I thought I'd point out a technical bug in one of the functions in AdobeLibrary1.jsx. The function file.getExtension() can return wrong results when the filename has no extension because (on Windows, at least) parts of the pathname can have "." in them. This isn't real common, but is possible. So if you pass the filename "c:/bob/ted.alice/jack" to your function, it will return ".alice/jack" as the extension which is not technically correct. In reality, it should return "" since there is no extension.
In my own code, I've used a regular expression /\.[^\/\\]*$/ which is a period, followed by some number of non-path separator characters at the end of the string and this handles both cases.
--John
In my own code, I've used a regular expression /\.[^\/\\]*$/ which is a period, followed by some number of non-path separator characters at the end of the string and this handles both cases.
--John
