[webkit-dev] svn-create-patch acting oddly lately
pkasting at google.com
Mon Jul 20 14:50:28 PDT 2009
On Mon, Jul 20, 2009 at 2:40 PM, Peter Kasting <pkasting at google.com> wrote:
> It looks from here like the chdir call is causing curdir() to report the
> non-symbolic-link form of things. If that's true, it seems like this
> workaround would work:
> my ($newdir) = @_;
> my $before = File::Spec->rel2abs( File::Spec->curdir() );
> + chdir $before; # Try and force curdir() to report the directory without
> symbolic links.
> + $before = File::Spec->rel2abs( File::Spec->curdir() );
> chdir $newdir;
> my $after = File::Spec->rel2abs( File::Spec->curdir() );
> Could you try this and see if it works?
> Also, any Perl hackers are welcome to chip in here on how the current code
> should be improved. I just looked up docs on the File::Spec module and saw
> them mentioning something about realpath() that might be relevant here...
Looking at this more, this code just looks wrong to me (although, like I
said, I know roughly zero Perl, so my instincts are not trustworthy).
Perhaps instead of the hack above, try adding "use Cwd;" to the top of the
file and then changing this to:
my ($newdir) = @_;
my $before = Cwd::getcwd();
my $after = Cwd::getcwd();
That seems like it ought to work a lot better.
If that solves your problem, I'll get this reviewed and checked in.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev