This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125426 - FileObject.getPath() incompatible with NB 6.0 version
Summary: FileObject.getPath() incompatible with NB 6.0 version
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-16 19:58 UTC by _ gordonp
Modified: 2008-12-22 10:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2008-01-16 19:58:44 UTC
In NB 6.0, the drive designator was returned as part of the path. In the current trunk, this is
no longer the case. This caused a serious regression in the gdb module (IZ 125319 - breakpoints
do not work on Windows).
Comment 1 rmatous 2008-01-16 21:57:35 UTC
Yes, was changed. Part of the changes from Jan 08 . See changes (especially One drive == one instance of filesystem on
windows):
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-masterfs/overview-summary.html

The path is relative path to the filesystem root. Root represents drive now, so the path doesn't contain drive. I didn't
expect someone could rely on it especially if javadoc for this method was restrictive enough (like "Do not use this
method to find a file path on disk!"). 
Comment 2 rmatous 2008-01-18 19:24:48 UTC
The original (6.0) impl. for getPath looked like this:
<code>return (isRoot()) ? "" : getFile().getAbsolutePath().replace("\\", '/');</code>

#125319 seems to be already fixed like that:
path = FileUtil.toFile(fo).getAbsolutePath();
if (Utilities.isWindows()) {
   path = path.replace("\\", "/"); // NOI18N
}