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 42059 - Masterfs completely broken on Unix
Summary: Masterfs completely broken on Unix
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 4.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-16 00:43 UTC by Jesse Glick
Modified: 2008-12-22 20:48 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 Jesse Glick 2004-04-16 00:43:40 UTC
Recent changes in masterfs started to make more
use of ResourcePath.getFile(), which it turns out
was totally broken on Unix. This would result in
the creation of files with URLs such as
file:/some/dir/home/jglick/ rather than
file:/home/jglick/ where the IDE was started with
current working directory /some/dir. Therefore the
IDE was thoroughly broken; for example, you could
not open any projects.

Hotfix is to impl getFile to behave differently on
Unix than on Windows: on Unix, make a File with
the initial '/', and on Windows, make it without
the initial '/' and with '\\' as the separator.

This looks very fragile however and I suggest the
whole representation of disk roots in masterfs be
reconsidered so as to be more robust and
platform-neutral; e.g. use an escaped version of
the disk root's absolute path as the first path
component on *all* platforms, so e.g. on Unix you
would have "/%5C/home/jglick" for /home/jglick and
on Windows you would have "/d:/temp/foo" for
d:\temp\foo.

Also masterfs unit tests failed massively on Unix.
With the patch, they pass (on Unix anyway).

Since masterfs is now critical for the
functionality of large parts of the IDE, I would
suggest its tests be given greater attention.
Every aspect of its functionality must be totally
covered by unit tests, and probably they should be
part of commit validation.
Comment 1 Jesse Glick 2004-04-16 01:09:34 UTC
Hopefully fixed.

committed     Up-To-Date  1.4        
openide/masterfs/src/org/netbeans/modules/masterfs/ResourcePath.java
Comment 2 Marian Mirilovic 2005-12-16 16:30:15 UTC
closing