Bug#507956: findimagedupes: Use of glob means folders with whitespace in their names are dropped
Okay, I removed the glob and just used opendir/readdir. I'm fairly certain this version should work properly. Thanks for noticing the problem Brendon. -jonathan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#507956: findimagedupes: Use of glob means folders with whitespace in their names are dropped
Oops. No, escaping doesn't suffice. I didn't test thoroughly. Time for some coffee. -jonathan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#507956: findimagedupes: Use of glob means folders with whitespace in their names are dropped
I think it suffices to escape the input: glob("\Q$file\E/*") $ find .|od -c 000 . \0 . / t h i s ' i s ' a 020 t e s t f i d \0 . / t h i s ' 040 i s ' a t e s t f i d / w i 060 b l e * h e l l o \0 . / t h i 100 s ' i s ' a t e s t f i d 120 / w i b l e * h e l l o / f o 140 o b q u x \n h e l l o \0 . / t 160 h i s ' i s ' a t e s t f 200 i d / w i b l e * h e l l o / 220 f o o b q u x \n h e l l o / b 240 a r \0 243 $ perl -e 'sub _{($f)[EMAIL PROTECTED];print"$f\0";map{_($_)}glob("\Q$f\E/*")}_(".")'|od -c 000 . \0 . / t h i s ' i s ' a 020 t e s t f i d \0 . / t h i s ' 040 i s ' a t e s t f i d / w i 060 b l e * h e l l o \0 . / t h i 100 s ' i s ' a t e s t f i d 120 / w i b l e * h e l l o / f o 140 o b q u x \n h e l l o \0 . / t 160 h i s ' i s ' a t e s t f 200 i d / w i b l e * h e l l o / 220 f o o b q u x \n h e l l o / b 240 a r \0 243 I have uploaded a new version with the fix. -jonathan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#507956: findimagedupes: Use of glob means folders with whitespace in their names are dropped
Hi Jonathan, I'd like to inform you about this problem. I guess the problem is not really hard to fix but I would like to leave you the final decision. Kind regards Andreas. On Sat, 6 Dec 2008, Brendon Higgins wrote: Package: findimagedupes Version: 2.11-2 Severity: normal Hi there, Line 365 of findimagedupes perl script makes a call to glob that fails when the path contains whitespace. "find -type d -print0 | findimagedupes -0 -" will ignore files in those directories because of this. The immediate solution might appear to be to use bsd_glob, but that only solves the problem of folders with whitespace. Folders with other characters that are meaningful to glob/bsd_glob will probably still have issues. Temporary workaround (for my situation, at least) is to use find to generate the full file list. I'd help more but my knowledge of perl is mediocre at best. FWIW, I don't think glob is necessary if an alternative folder content listing function can be used. Peace, Brendon -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages findimagedupes depends on: ii libc6 2.7-16 GNU C Library: Shared libraries ii libfile-mimeinfo-perl 0.15-1 Perl module to determine file type ii libgraphics-magick-perl 1.1.11-3.2 format-independent image processin ii libinline-perl0.44-5 Write Perl subroutines in other pr ii perl 5.10.0-18 Larry Wall's Practical Extraction ii perl-base [perlapi-5.10.0]5.10.0-18 minimal Perl system findimagedupes recommends no packages. findimagedupes suggests no packages. -- no debconf information -- debian-science-maintainers mailing list [EMAIL PROTECTED] http://lists.alioth.debian.org/mailman/listinfo/debian-science-maintainers -- http://fam-tille.de -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#507956: findimagedupes: Use of glob means folders with whitespace in their names are dropped
Package: findimagedupes Version: 2.11-2 Severity: normal Hi there, Line 365 of findimagedupes perl script makes a call to glob that fails when the path contains whitespace. "find -type d -print0 | findimagedupes -0 -" will ignore files in those directories because of this. The immediate solution might appear to be to use bsd_glob, but that only solves the problem of folders with whitespace. Folders with other characters that are meaningful to glob/bsd_glob will probably still have issues. Temporary workaround (for my situation, at least) is to use find to generate the full file list. I'd help more but my knowledge of perl is mediocre at best. FWIW, I don't think glob is necessary if an alternative folder content listing function can be used. Peace, Brendon -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages findimagedupes depends on: ii libc6 2.7-16 GNU C Library: Shared libraries ii libfile-mimeinfo-perl 0.15-1 Perl module to determine file type ii libgraphics-magick-perl 1.1.11-3.2 format-independent image processin ii libinline-perl0.44-5 Write Perl subroutines in other pr ii perl 5.10.0-18 Larry Wall's Practical Extraction ii perl-base [perlapi-5.10.0]5.10.0-18 minimal Perl system findimagedupes recommends no packages. findimagedupes suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]