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 15604 - Paste to a filesystem, which ignores some files does not work and throws exception
Summary: Paste to a filesystem, which ignores some files does not work and throws exce...
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 11354 14869 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-09-18 17:42 UTC by Martin Entlicher
Modified: 2010-04-07 20:30 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Exception thrown (2.23 KB, text/plain)
2001-09-18 17:43 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2001-09-18 17:42:02 UTC
FileStateInvalidException (in the attachment) is thrown, when the target
filesystem ignores some files, that are copied into it. This makes impossible to
copy folders, that contains CVS/ subfolders from local file system to CVS file
system, because CVS file system ignores CVS/ folders.
Can be reproduce on local file system also, when you set "Ignored files" (the
attached exception is thrown, when .form files were ignored, but the most
important is it for CVS filesystems).
Comment 1 Martin Entlicher 2001-09-18 17:43:39 UTC
Created attachment 2585 [details]
Exception thrown
Comment 2 Martin Entlicher 2001-09-18 17:48:11 UTC
*** Issue 14869 has been marked as a duplicate of this issue. ***
Comment 3 Martin Entlicher 2001-09-18 17:48:26 UTC
*** Issue 11354 has been marked as a duplicate of this issue. ***
Comment 4 rmatous 2001-09-26 17:18:44 UTC
FileSystems can hide some files. AbstractFileSystem.List.children 
very often do that. Here described problem arrives after calling 
fo.createData ("hidden_file"). There are expactation that after such 
calling such method will be created FileObject. But because this file 
should be hidden there is not possible to create and return such 
instance. API doesn`t allow return null so exception must be fired. 
That`s what can be seen in stacktrace. So perhaps some support for 
hidden_files as enhancement. I`ll let it in Issuezila for next 
comments and suggestions.
Comment 5 Jan Chalupa 2001-11-27 13:02:42 UTC
Target milestone -> 3.3.1.
Comment 6 Marek Grummich 2002-07-22 11:27:06 UTC
Set target milestone to TBD
Comment 7 Marek Grummich 2002-07-22 11:28:34 UTC
Set target milestone to TBD
Comment 8 rmatous 2002-07-23 15:17:12 UTC
I think that should not be fixed, because FileSystem can hides
arbitrary files. So, it`s natural that if FileSystem wants  hide some
FileObjects, doesn`t distribute them, then would be strange method
createData would return such FileObject and then fs.findResource would
not be possible to find it. Definitely is not desirable to call delete
on FileObject that represents CVS folder. Also rename would be be a
little strange. Also CVS folder can be created only inside CVS
filesystem and not e.g. publicly call rootOfCvsFs.createFolder
("CVS"). I think that the best thing that can be done is fire
exception that it is impossible to accomplish operation and that`s how
is it implemented at the moment. Then marked as WONTFIX.
Comment 9 rmatous 2002-07-23 15:56:31 UTC
Perhaps FileSystems should provide informational method, that will
return list or array of resource names (getPackageNameExt), that are
hidden by FileSystem. Or better: boolean isHiddenResource (String). Or
both ? Or neither first, nor second ? Or better idea ?

Usage:
LocalFileSystem lfs = ..
AnyFileSystem afs = ..;

FileObject lfo = lfs.findResource ("///");
if (afs.isHiddenResource (lfo.toString ()) )
Comment 10 Martin Entlicher 2002-07-23 16:13:26 UTC
Yes, this can work. Either the copy/paste action must have a way to
find out which files it can copy OR the filesystem must be able to
provide some special FileObjects just for copy/paste purpose.
I also like more the first option.
Comment 11 Antonin Nebuzelsky 2008-04-15 17:16:42 UTC
Reassigning to new module owner jskrivanek.
Comment 12 Jaroslav Tulach 2010-04-07 20:30:46 UTC
With masterfs the problem shall be gone, shalln't it?