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

Summary: FileObject.getPath() incompatible with NB 6.0 version
Product: platform Reporter: _ gordonp <gordonp>
Component: FilesystemsAssignee: rmatous <rmatous>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

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
}