Skip Menu |
 

This queue is for tickets about the PathTools CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: ramesh.thangamani [...] yahoo.co.in
Cc:
AdminCc:

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



Subject: File::Spec->rootdir() not returning correct roordir for windows
Download (untitled) / with headers
text/plain 1.1k
Environment details ----------------------- C:\Documents and Settings\rthangam.APPLICATIONS>perl -v This is perl, v5.8.4 built for MSWin32-x86-multi-thread (with 3 registered patches, see perl -V for more detail) Copyright 1987-2004, Larry Wall Binary build 810 provided by ActiveState Corp. http://www.ActiveState.com ActiveState is a division of Sophos. Built Jun 1 2004 11:52:21 Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. Operating system: Windows XP Module version -------------- File::Spec => version 0.87 File::Spec::Win32 => version 1.4 C:\>perl -e "use File::Spec; $rootdir = File::Spec->rootdir(); print $rootdir" / For windows operating system the root directory is printed as '/' which is incorrect. I guess it should be printing c:\ for this example. Can you please check this out.
Download (untitled) / with headers
text/plain 241b
File::Spec is now at version 3.2701, you can upgrade your copy. rootdir() now returns \, which is the root directory on the current volume. To get the root directory on a different volume you can do catpath($volume, rootdir(), ''). -Ken
Download (untitled) / with headers
text/plain 435b
On Thu Mar 27 08:08:06 2008, KWILLIAMS wrote: Show quoted text
> File::Spec is now at version 3.2701, you can upgrade your copy. > > rootdir() now returns \, which is the root directory on the current > volume. To get the root > directory on a different volume you can do catpath($volume, rootdir(), > ''). > > -Ken
Thanks Ken, the latest version returns '\' but i don't think rootdirectory concept exists in windows. Please provide your comments.
Download (untitled) / with headers
text/plain 335b
On Fri Mar 28 02:18:55 2008, RTHANGAM wrote: Show quoted text
> Thanks Ken, the latest version returns '\' but i don't think > rootdirectory concept exists in windows. Please provide your comments.
There's no single root directory on windows, there are several, one per drive letter. Experiment with the following: c: dir \ d: dir \ -Ken


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.