Subject: | cwd.t fails for pathologically named file. |
Date: | Sun, 13 Feb 2011 02:41:13 +0100 |
To: | bug-PathTools [...] rt.cpan.org |
From: | Alexander Haeckel <alexanderhaeckel [...] lavabit.com> |
Hi,
I had a file named "root^J" in my "/" directory where the filename
ended with a newline on a AMD64/Debian Lenny box.
This strange file turned out to be the
"AMD Power Monitor Setting File".
Don't remember how I got that thing but it brought me this crash:
t/cwd.t ................. 1/34
# Failed test (t/cwd.t at line 247)
# got: '/root'
# expected: '/root
# '
# Failed test (t/cwd.t at line 248)
# got: '/root'
# expected: '/root
# '
# Looks like you failed 2 tests of 34.
I resolved the matter by simply renaming the file, but I would
recommend to filter out such pathologically named files
before calling Cwd::fast_abs_path($file) or
Cwd::fast_abs_path($file) at least in t/cwd.t .
Kind regards,
Alexander Haeckel
--
"I can't understand why people are frightened of new ideas.
I'm frightened of the old ones.”
- John Cage