Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] Deleting a project with locked files


If you haven't already done so, I suggest entering a bug report for the NPE in DeleteResourceOperation. I don't know of any way to run a check for files that have open file handles.  If you can track down the code that's locking the file, you could make it use an IFile scheduling rule while reading, which would prevent the delete operation from starting until the read is finished.




Brian Bauman <baumanbr@xxxxxxxxxx>
Sent by: platform-core-dev-bounces@xxxxxxxxxxx

01/09/2008 12:47 PM

Please respond to
"Eclipse Platform Core component developers list."        <platform-core-dev@xxxxxxxxxxx>

To
platform-core-dev <platform-core-dev@xxxxxxxxxxx>
cc
Subject
[platform-core-dev] Deleting a project with locked files






In PDE we having a situation where we are trying to delete a project that contains at least one file which is currently in use/locked.  I was wondering if there was any way to try to delete a project, and if we have a problem deleting a file/folder, undo the deletion?  Or possibly run a check to see if the project has any files which are locked/cause problems during a delete?

I have been playing around with DeleteResourcesOperation and can catch the ExecutionException when a file is not able to be deleted, but when I try to run DeleteResourcesOperation.undo(..), it throws a NPE (I imagine since the operation was not run successfully).


Any suggestions?


Thanks!


Brian Bauman
   IBM Software Group - Austin, TX
   Eclipse Committer
   baumanbr@xxxxxxxxxx
   (512) 838 -2938 (T/L 678-2938)
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev


Back to the top