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 122131 - The wizard doesn't check, whether the created folder in document path already exists
Summary: The wizard doesn't check, whether the created folder in document path already...
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-16 11:55 UTC by Petr Pisl
Modified: 2007-11-22 08:54 UTC (History)
1 user (show)

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 Petr Pisl 2007-11-16 11:55:04 UTC
When you enter a context path, appropriate folder is created for document path. The wizard doesn't check, whether the
folder already exists. The problem is that a source files can be rewritten, if the folder is also a source root for a
previous project.
Comment 1 Andrew Korostelev 2007-11-19 11:34:29 UTC
will notify that folder already exists, if possible to check this (can be not possible for remote server).
I think it is correct to allow to use path to existing folder.
Comment 2 Alexei Mokeev 2007-11-20 07:56:58 UTC
The fix is clear: when server is local then check and warn user if the folder exist.
It is a candidate for the external help.
Comment 3 Alexei Mokeev 2007-11-21 09:29:51 UTC
I'm asking Erno to take a look.
Comment 4 Erno Mononen 2007-11-21 10:01:47 UTC
Taking over.
Comment 5 Erno Mononen 2007-11-21 13:16:01 UTC
Fixed in trunk, please review.

Checking in LocalServerProjectWizardPanel.java;
/cvs/scripting/php/rtexplorer/src/org/netbeans/modules/php/rt/providers/impl/local/
LocalServerProjectWizardPanel.java,v  <--  LocalServerProjectWizardPanel.java
new revision: 1.3; previous revision: 1.2
done
Checking in Bundle.properties;
/cvs/scripting/php/rtexplorer/src/org/netbeans/modules/php/rt/providers/impl/local/Bundle.properties,v  <--  
Bundle.properties
new revision: 1.15; previous revision: 1.14
done
Comment 6 Andrew Korostelev 2007-11-22 08:46:02 UTC
Thank you.

just one correction.
Common user's behavior is to download already existing files into project and modify.

In this case document path
(document root from server settings + context path from project) 
points to existing web site files inside server's http root.

Therefore it should be allowed to finish wizard. 
I think validation method should return true, to show warning message, not error.

I've updated sources.
Comment 7 Erno Mononen 2007-11-22 08:54:46 UTC
I see, thanks a lot for reviewing the fix.