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 17215 - "Invalid<space>" is prefixed in front of local FS settings file name
Summary: "Invalid<space>" is prefixed in front of local FS settings file name
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-01 19:04 UTC by Isao Yanagimachi
Modified: 2008-12-22 23:56 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 Isao Yanagimachi 2001-11-01 19:04:16 UTC
Hi, 

Whenever a new local FS is mounted on the File System Explorer, 
NetBeans creates a settings file under 
<userdir>\system\Projects\Default\system\Mount, and the settings file has all 
of its special characters escaped in its name. This behavior is expected. But 
starting from Oct 31th build, the settings file name is pre-pended by the string
"Invalid<space>". For example if I mount the directory "f:\antlr" on the 
NetBeans File Explorer, it creates  a setting file named as 
"Invalid F#003A#005Cantlr.settings".

It looks like a part of an error message has been pre-pended to the
file name string.  Also the space in the name causes the problem in a platform
such as OpenVMS where the space is not a valid file name character.

Thanks

Isao Yanagimachi
Compaq Computer Corporation
Comment 1 rmatous 2001-11-02 15:56:23 UTC
FileSystem.getDisplayName is name that is presented to user. So I 
think that is OK if it declares that FileSystem is invalid. Nobody 
can`t rely that this name won`t contain spaces. If this name is used 
as name of FileObject (then directly for filename) then must be 
either encoded or another name must be choosed indstead of 
displayName. Jan please look at this bug. 
Comment 2 Isao Yanagimachi 2001-11-02 16:29:44 UTC
It seems like the problem stems from the fact that 
when NetBeans creates a settings file for the newly mounted local 
file system, it uses the display name of the file system as a file 
name. However, since the settings file gets created before the local
file system gets added to the FS Repository, the FileSystem.valid is 
always false. This makes the mounted file system's settings file 
name always invalid.

IMHO, the display name should not be used as a settings file name 
since there is no guarantee that it will be unique. Also the settings 
file name should not contain spaces just like any other data files 
created by NetBeans. In an operating system like OpenVMS, the space 
is not allowed in the file name.


Isao Yanagimachi
Compaq Computer Corporation
Comment 3 Jan Pokorsky 2001-11-05 18:35:13 UTC
To prevent including "Invalid<space>" fs.getSystemName is used now. 
There is no problem with uniqueness of filenames using the display 
name. It is a job of the settings support. But you are right about 
encoding. If you have further interest about new encoding support in 
filesystems read thread "filenames (length and deprecated characters)" 
on nbdev. Thanks for your help.
Comment 4 Marian Mirilovic 2002-10-17 13:22:39 UTC
closed