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 132993 - Files are not copied to new folder after changing Source Folder
Summary: Files are not copied to new folder after changing Source Folder
Status: RESOLVED INVALID
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks: 131609
  Show dependency tree
 
Reported: 2008-04-16 13:36 UTC by Victoria Zhukovskaya
Modified: 2008-04-17 17:24 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
project - properties - and file system (87.65 KB, image/png)
2008-04-17 09:08 UTC, Victoria Zhukovskaya
Details
nbproject (688 bytes, application/x-compressed)
2008-04-17 09:13 UTC, Victoria Zhukovskaya
Details
afterstep1.PNG (19.08 KB, image/png)
2008-04-17 16:17 UTC, Victoria Zhukovskaya
Details
afterstep2.PNG (18.49 KB, image/png)
2008-04-17 16:18 UTC, Victoria Zhukovskaya
Details
result.PNG (21.19 KB, image/png)
2008-04-17 16:18 UTC, Victoria Zhukovskaya
Details
messages.log (20.84 KB, text/plain)
2008-04-17 16:19 UTC, Victoria Zhukovskaya
Details
nbproject.zip (690 bytes, application/x-compressed)
2008-04-17 16:20 UTC, Victoria Zhukovskaya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victoria Zhukovskaya 2008-04-16 13:36:27 UTC
Product Version: NetBeans IDE Early Access for PHP (Build 2008-04-16_11-49-41)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1252; en_US (php)
Userdir: D:\Documents and Settings\vz153235.OLYMP\.netbeans\6.1ea-php

1. Create new PHP project with default settings
2. Invoke properties for the php project
3. Change source folder to "C:\tmp" f.e.
4. Press Ok.
   The Source Files node is empty on Project tab - there is no index.php
   C:\tmp does not contain any files
 

5. Invoke properties for the php project 
  Source folder (not "C:\tmp")
Comment 1 Tomas Mysik 2008-04-16 13:57:16 UTC
Unfortunately I'm not able to reproduce this issue. I changed sources from c:\tmp to z:\web and vice versa several 
times and everything works as expected. 

> 5. Invoke properties for the php project 
> Source folder (not "C:\tmp")

So, what is your Sources field value? Could you zip and attach your project metadata (located in <project>/nbproject 
directory) please? Thanks.
Comment 2 Victoria Zhukovskaya 2008-04-17 09:07:05 UTC
build    NetBeans-dev-2008-04-16_22-19-53.zip

1. Create new PHP project with default settings (sources in htdocs\ProjectN)
2. Invoke properties for the php project
3. Change source folder to "C:\PhpSrc" f.e.
4. Press Ok.
   The Source Files node is empty on Project tab - there is no index.php
   C:\PhpSrc does not contain any files
5! (another) 
   A) PhpSrc folder is empty. - incorrect
   B) htdocs\ProjectN has index - expect that index will be in PhpSrc 
   C) Source Folder on Properties window - it is correct

I attached screanshot
Comment 3 Victoria Zhukovskaya 2008-04-17 09:08:28 UTC
Created attachment 60322 [details]
project - properties - and file system
Comment 4 Victoria Zhukovskaya 2008-04-17 09:13:10 UTC
Created attachment 60323 [details]
nbproject
Comment 5 Tomas Mysik 2008-04-17 12:42:50 UTC
So I see that you are not able to reproduce the original issue - so closing as WORKSFORME, feel free to reopen and 
post any comment. Please, attach your messages.log file every time because error reporting is turned off so if you are 
testing wizard only small red point appears for a while in the right bottom corner of the IDE but after that no 
exception is shown neither in the IDE nor in the console. Thanks.

Now to your another steps - please, file a new issue for another bug next time, thanks. Just briefly:
> 1. Create new PHP project with default settings (sources in htdocs\ProjectN)
> 2. Invoke properties for the php project
> 3. Change source folder to "C:\PhpSrc" f.e.
> 4. Press Ok.
>    The Source Files node is empty on Project tab - there is no index.php
>    C:\PhpSrc does not contain any files

OK, this is correct.

> 5! (another) 
>    A) PhpSrc folder is empty. - incorrect

No, it's correct, see the comment above - the folder *is* empty. Copying is done only in one way of course - from 
sources to target folder.

>    B) htdocs\ProjectN has index - expect that index will be in PhpSrc 

Yes, this is issue - P3 I would say - we should not allow to change sources if the folder for copying is not empty - 
could you please file an issue for that? Thanks.

>    C) Source Folder on Properties window - it is correct

OK, the original issue cannot be reproduced anymore (probably fixed already).
Comment 6 kozlov 2008-04-17 13:39:22 UTC
Files are not copied to new folder after changing Source Folder.  It is P1 and it is showstopper.
Comment 7 Tomas Mysik 2008-04-17 14:41:36 UTC
kozlov, please look at the summary and then look at your comment - they are not related, please read the whole issue, 
you are mixing two issues into one

Now posting email for Victoria about copying sources, please file a new issue for that, this issue is not reproducible 
no more. If yes, please reopen this issue and provide exact steps to reproduce, attach messsages.log. Thanks.

----- %< -----

Hi Victoria,
Radek and me (Radek is the author of code for copying sources) just tried to 
change sources and it works (with one minor issue) - we created new PHP 
project with sources in "<Project folder>/web" - index.php was copied. Then 
we changed sources via project properties to another existing sources and 
pressed OK - sources were copied to the target folder. The only issue here is 
that the old sources (index.php in our case) remained in the target folder - 
this is issue, project properties should refuse copying to non empty folder 
if one changes sources (user himself/herself should clean the target 
directory). So could you please file P3 against PHP project (assigned to me)? 
I will add error message about it.
(We already have similar message if you select copying and the target folder 
is not empty.)
It's P3 from my point of view because workaround is easy - just clean your 
target directory before pressing OK (in project properties) or just close the 
project, delete the target directory and reopen the project - the target 
directory will be recreated and all the files/folders will be copied there.

Thanks for catching that,
Tomas
Comment 8 kozlov 2008-04-17 15:50:27 UTC
Updated
Comment 9 Victoria Zhukovskaya 2008-04-17 16:15:16 UTC
So.
I try to summarize

Product Version: NetBeans IDE Early Access for PHP (Build 2008-04-17_13-57-27)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1252; en_US (php)
Userdir: D:\Documents and Settings\vz153235.OLYMP\.netbeans\6.1ea-php

before start IDE I deleted all old files

Steps:
1. Create PHP Project 
    Project Sources   - "<Project folder>/web"
   Screenshot of properties:  afterstep1.png
    
2. Invoke Properties for project
   Change source folder to empty folder C:\PhpSrc and press OK
   Screenshot of properties:  afterstep2.png

Actual result
  index.php (after all steps) steel  is "<Project folder>/web"
  but should be in  C:\PhpSrc

See Files tab - in screenshot result.png

Also was attached message.log
And zip of nbproject


   


    
Comment 10 Victoria Zhukovskaya 2008-04-17 16:17:55 UTC
Created attachment 60354 [details]
afterstep1.PNG
Comment 11 Victoria Zhukovskaya 2008-04-17 16:18:21 UTC
Created attachment 60355 [details]
afterstep2.PNG
Comment 12 Victoria Zhukovskaya 2008-04-17 16:18:55 UTC
Created attachment 60356 [details]
result.PNG
Comment 13 Victoria Zhukovskaya 2008-04-17 16:19:47 UTC
Created attachment 60357 [details]
messages.log
Comment 14 Victoria Zhukovskaya 2008-04-17 16:20:37 UTC
Created attachment 60358 [details]
nbproject.zip
Comment 15 Tomas Mysik 2008-04-17 16:39:47 UTC
> Actual result
>   index.php (after all steps) steel  is "<Project folder>/web"
>   but should be in  C:\PhpSrc

No, definitely shouldn't because you are just changing the sources location not copying or something similar. It makes 
no sense to me to copy sources from one location to another.

I suggest closing as INVALID - any objections?
Comment 16 rmatous 2008-04-17 16:45:16 UTC
Behaves as  designed. I have strong opinion, that the behavior is OK and really should be closed as INVALID. 
Comment 17 Victoria Zhukovskaya 2008-04-17 17:06:39 UTC
Ok
I agree.
If here is such logic. Only change path without copying.
I agree close as invalid.
Thank You.

Comment 18 Tomas Mysik 2008-04-17 17:24:32 UTC
Closing as agreed.