Skip Menu |

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 25088
Status: resolved
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.24
Fixed in: (no value)



Subject: Cwd returns the current path upcased on OS X... sometimes.
$ pwd /Users/schwern/devel/svk $ echo $PWD /Users/schwern/devel/svk $ perl -wle 'use Cwd; for my $func (qw(cwd getcwd fastcwd fastgetcwd abs_path realpath fast_abs_path)) { print eval "Cwd::$func()\n" }' /Users/schwern/devel/SVK /Users/schwern/devel/SVK /Users/schwern/devel/SVK /Users/schwern/devel/SVK /Users/schwern/devel/SVK /Users/schwern/devel/SVK /Users/schwern/devel/SVK $ /bin/pwd /Users/schwern/devel/SVK $ uname -a Darwin windhund.schwern.org 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386 MacBook1,1 Darwin $ perl -v This is perl, v5.8.8 built for darwin-thread-multi-2level The problem appears to be both that /bin/pwd is not to be trusted AND there's something wrong with whatever is used to compile the other Cwd functions. The REALLY bizarre thing is this: 0 windhund ~/devel$ /bin/pwd /Users/schwern/devel 0 windhund ~/devel/ExtUtils-MakeMaker$ /bin/pwd /Users/schwern/devel/ExtUtils-MakeMaker 0 windhund ~/devel/pugs$ /bin/pwd /Users/schwern/devel/pugs This bug only appears to effect one directory. I'm quite willing to concede that my filesystem is hosed.
Turns out it was some sort of directory corruption. ktracing through /bin/pwd showed it was getting the path from fcntl(). And using fcntl() from Perl showed.. $ perl -wle 'open FILE, "." or die; $ret = " "x1024; print fcntl \*FILE, 0x32, $ret or die $!; print $ret' 0 but true /Users/schwern/devel/SVK So it's not Cwd's fault. Renaming the directory then renaming it back corrected the problem. Not a bug.