Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in File::Spec::Win32 0.3 catpath for UNC paths ? #6495

Closed
p5pRT opened this issue May 8, 2003 · 5 comments
Closed

Bug in File::Spec::Win32 0.3 catpath for UNC paths ? #6495

p5pRT opened this issue May 8, 2003 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented May 8, 2003

Migrated from rt.perl.org#22148 (status was 'resolved')

Searchable as RT22148$

@p5pRT
Copy link
Author

p5pRT commented May 8, 2003

From msouthern@exsar.com

In File​::Spec​::Win32->catpath

$volume is "\\\\myserver\\temp"

Line 236 is supposed to a path separator to the end of the volume before
it concatenates it to $directory

  $volume .= $1
  if ( $volume =~ m@​^([\\/])[\\/][^\\/]+[\\/][^\\/]+\Z(?!\n)@​s &&
  $directory =~ m@​^[^\\/]@​s
  ) ;

the pattern match involving $directory is always performed last and does
not save $1.

Maybe it should be;

  $volume .= $1
  if ( $directory =~ m@​^[^\\/]@​s &&
  $volume =~ m@​^([\\/])[\\/][^\\/]+[\\/][^\\/]+\Z(?!\n)@​s
  ) ;

Best regards,

Mark.

p.s. as an aside, could File​::Spec define the path separator as a
constant?

Mark Southern
Informatics
ExSAR Corporation
11 Deer Park Drive Suite 103
Monmouth Junction NJ 08852

This message (including any attachments) may contain confidential
information intended for a specific individual and purpose, and is
protected by law. If you are not the intended recipient, you should
delete this message. Any disclosure, copying, or distribution of this
message, or the taking of any action based on it, is strictly
prohibited.

@p5pRT
Copy link
Author

p5pRT commented Oct 7, 2004

From @smpeters

[msouthern@​exsar.com - Thu May 08 13​:28​:06 2003]​:

In File​::Spec​::Win32->catpath

$volume is "\\\\myserver\\temp"

Line 236 is supposed to a path separator to the end of the volume
before
it concatenates it to $directory

 $volume \.= $1
     if \( $volume =~ m@​^\(\[\\\\/\]\)\[\\\\/\]\[^\\\\/\]\+\[\\\\/\]\[^\\\\/\]\+\\Z\(?\!\\n\)@​s 

&&

          $directory =~ m@​^\[^\\\\/\]@​s
        \) ;

the pattern match involving $directory is always performed last and
does
not save $1.

Maybe it should be;

$volume \.= $1
if \(  $directory =~ m@​^\[^\\\\/\]@​s &&
      $volume =~ m@​^\(\[\\\\/\]\)\[\\\\/\]\[^\\\\/\]\+\[\\\\/\]\[^\\\\/\]\+\\Z\(?\!\\n\)@​s
   \) ;

A ticket has been created for PathTools also at
https://rt.cpan.org/NoAuth/Bug.html?id=7925.  A script demonstrating
the bug was also included.

@p5pRT
Copy link
Author

p5pRT commented Oct 7, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 6, 2005

From @schwern

[stmpeters - Thu Oct 07 10​:06​:35 2004]​:

A ticket has been created for PathTools also at
https://rt.cpan.org/NoAuth/Bug.html?id=7925.  A script demonstrating
the bug was also included.

If the ticket's being handled there we don't need an open copy here.
Resolving this.

@p5pRT p5pRT closed this as completed Jul 6, 2005
@p5pRT
Copy link
Author

p5pRT commented Jul 6, 2005

@schwern - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant