Disaster!! Disaster?? Follow
Sorry to use this title.
But one of my Teammates have chosen "/" for his project's exploded directory. So what happened? After compiling his project, he only found that almost everything in c:\ was wiped out!!
Oh, say goodbye to his system and works of these days.
I know this is not a disaster. Instead, it is just a mistake. But, newbies - especially those whose native tongue is not English - never stop making mistakes like this... Would there please be some machanic to prevent this from happen? At lease IDEA should show a confirming dialog when he want to delete all the files before syncronizing or cleaning on rebuild.
And in my opinion, it is possible to keep a list of those files generated by IDEA in the explode directory (and also the output directory as the same). And the delete action should only delete files in that list. Maybe if there are exception, show another confirm dialog as well.
If someone have mentioned this, forgive me please. :)
Please sign in to leave a comment.
I don't know about tracking which files are copied to the exploded
directory, but I definitly second "the motion" to show a confirmation
dialog if the user chooses a root directory (of any drive, on Windows,
or the "/" on Linux/UNIX)...
Sorry about your teammate :(
The issue has been discussed about a month ago:
The bottom line is it has been made harder to shoot yourself in
the foot with Irida, but it is still possible.
That indeed would be a dumb mistake to make, but how do you suggest idea
'know' that C:\ is necessarily bad? On unix / would not let you write
anything out because of permissions, unless he's running IDEA as root in
which case you get what you deserve, but on windows you could also set
it to d:\ and it would give you the same result, IDEA can't really guess
this was not your intention to really do this.
IDEA always suggests the appropriate exploded directory, which is a NEW
directory INSIDE the project root. I think that's good enough, and if
it's a newbie, then he should just follow good enough while s/he
understands how things work :)
What would the confirm dialog do??? If you click yes I want c:\ because
you don't know any better, you're gonna get c:\ as a directory. On Unix
the directories you can hose are less evident because of permissions.
Robert S. Sfeir wrote:
>>I don't know about tracking which files are copied to the exploded
>>directory, but I definitly second "the motion" to show a confirmation
>>dialog if the user chooses a root directory (of any drive, on Windows,
>>or the "/" on Linux/UNIX)...
yes, but i'm sure most people would then think again if they actually
want c:\ as their exploded directory. The dialog can also indicate to
the user "The contents in the directory you specify will be deleted."
I'm sure that will get anyone's attention...
Robert S. Sfeir wrote:
Again - simply state in the exploded dir selection wizard stage that all
contents of the exploded dir will be erased.
Then, if the user chooses a directory that already has some contents -
we can show a confirm dialog that says "Hey you! The dir has contents
that will be erased - are you absolutely nuts!?" or something along
these lines ;)
ofcourse a "Do not ask me again" checkbox would be nice ;)
Yeah, I quite agree with you that we can't distiguish which pattern is harmful in the exploded directory option , just from the name.
But would the following idea be some solution?
Generally, the Exploded Directory is always empty, when we create a new project. So everything in it SHOULD all be generated by IDEA. You see, there will be a generating action. If we could keep a list of what is generated when acting that action, then later IDEA will get information about the files it should delete in the Exploded Directory. IDEA should ignore the files that are in the Exploded Directory but not in the former list. In advance, just like what is happened when we uninstall softwares on windows, a dialog is shown to tell you that there are files not cleaned in the Exploded Directory and you should go there and clean them manually.
I think we could discuss out the solution, and maybe it is not so hard to realize. Now only newbie, but myself (Oh, another newbie :)) have made a similar mistake that day. I always like to let ResourceDir be the same to ExplodedDir, for instance both are the $Project/web. And that day, I'm so curious about what will happen if I delete the WebResourceDirectory settings of my web module. Would it ignore the whole step and be a little faster when compiling J2EE module? And I did it. Oh yeah, it is much faster! Because every thing in $project/web are deleted... But thanks to the Local History, i could get all files back :) So maybe it is not so simple to understand how everything works.
Sorry, forget everything i said please. I found them all in another post.
"warbaby" <email@example.com> wrote in message
exploded directory. So what happened? After compiling his
project, he only found that almost everything in c:\ was
Another one bites the dust.
I opinioned about a month or so ago that IDEA should not
remove files that were not created by it. Unsurprisingly, I
still think the same.
Unsurprisingly, some people just don't hear what they've been said.
The following have been said 3.10.2005 clarifying how this stuff works in
"Develop with pleasure!"
>> Sorry to use this title.
>> But one of my Teammates have chosen "/" for his project's