Strage behaviour of remote_directory

Hello!

I’m trying to copy whole directory tree from cookbook files/default/far2 to windows workstation.

Im using following code:

remote_directory “#{ENV[“DFCLIENT”]}/opt/far2” do
source "far2"
files_backup 0
purge true
overwrite true
end

funny thins is - that each 2 runs it DELETES everything in opt/far2 directory!

Is that bug, or maybe I don’t understand how purge works?

Im using chef 0.9.12 on windows.

Grzegorz Marszałek
graf0@post.pl

Wiadomość napisana przez Grzegorz Marszałek w dniu 2011-02-09, o godz. 23:01:

Hello!

I'm trying to copy whole directory tree from cookbook files/default/far2 to windows workstation.

Im using following code:

remote_directory "#{ENV["DFCLIENT"]}/opt/far2" do
source "far2"
files_backup 0
purge true
overwrite true
end

funny thins is - that each 2 runs it DELETES everything in opt/far2 directory!

Is that bug, or maybe I don't understand how purge works?

Im using chef 0.9.12 on windows.
This behaviour happens only when purge is set to true. It seems, that chef tries to purge everything from directory!


Grzegorz Marszałek
graf0@post.pl

On Wednesday, February 9, 2011 at 3:33 PM, Grzegorz Marszałek wrote:

Wiadomość napisana przez Grzegorz Marszałek w dniu 2011-02-09, o godz. 23:01:

Hello!

I'm trying to copy whole directory tree from cookbook files/default/far2 to windows workstation.

Im using following code:

remote_directory "#{ENV["DFCLIENT"]}/opt/far2" do
source "far2"
files_backup 0
purge true
overwrite true
end

funny thins is - that each 2 runs it DELETES everything in opt/far2 directory!

Is that bug, or maybe I don't understand how purge works?

Im using chef 0.9.12 on windows.
This behaviour happens only when purge is set to true. It seems, that chef tries to purge everything from directory!


Grzegorz Marszałek
graf0@post.pl
I'm guessing this is a bug related to how Chef compares the existing files to the files in the remote directory, and it's probably related to windows. Can you create a ticket for this in JIRA, including the relevant debug output from the Chef run?

Thanks,

Dan DeLeo