[poppler] About getFileSpecNameForPlatform
Carlos Garcia Campos
carlosgc at gnome.org
Wed Jul 1 02:46:51 PDT 2009
El mar, 30-06-2009 a las 23:12 +0200, Albert Astals Cid escribió:
> Hi, file on bug 22551 is failing on getFileSpecNameForPlatform
>
> if (fileSpec->isDict()) {
> #ifdef WIN32
> if (!fileSpec->dictLookup("DOS", &obj1)->isString()) {
> #else
> if (!fileSpec->dictLookup("Unix", &obj1)->isString()) {
> #endif
> obj1.free();
> if (fileSpec->dictLookup("UF", &obj1)->isString ()) {
> name = obj1.getString()->copy();
> } else if (fileSpec->dictLookup("F", &obj1)->isString ()) {
> name = obj1.getString()->copy();
> } else {
> error(-1, "Illegal file spec in link");
> }
> }
> obj1.free();
>
> // error
> } else {
> error(-1, "Illegal file spec in link");
> }
>
> The thing is that i seem to miss a else here, i mean if Unix is not found we
> use UF or F, but if Unix is found shouldn't we do
> name = obj1.getString()->copy();
you are right.
> Carlos i think this code is yours, is it a typo/bug or am i missing something?
Attached patch should fix the problem. It also makes that code little
bit easier to read.
> Albert
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
--
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Do-not-use-F-and-UF-entries-if-Unix-or-DOS-are-prese.patch
Type: text/x-patch
Size: 4557 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090701/8b4f8f66/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
digitalmente
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090701/8b4f8f66/attachment.pgp
More information about the poppler
mailing list