bright, fresh software
Downloads  |  Buy

wyUpdate.exe deletes empty folders [Solved]

wyUpdate.exe deletes empty folders [Solved]

Postby Pekka » September 11th, 2011, 2:49 pm

Hi!
wyUpdate.exe 2.6.14.0 seems to remove all empty folders from my application. For example the user has version 1.0 of my program and he let's wyUpdate to check updates. wyUpdate finds a new version 1.1 which has only a minor change in one text file. Updating goes without problems, only one file is downloaded. But...also all empty folders, like an empty log and tmp folders of my program doesn't exist anymore. This is not supposed to happen. Can this be prevented?

Regards,
Pekka
Pekka
 

Re: wyUpdate.exe deletes empty folders

Postby Sam » September 11th, 2011, 4:45 pm

Hey Pekka,

When wyBuild compares versions of your software it decides which files will be added, which files will be patched, and which files/folders will be deleted. Let's say you have version 1.0 and version 1.1. If in version 1.0 you have a folder "YourFolder" and in version 1.1 this folder isn't present in wyBuild then wyBuild will see that as "OK, I'll delete the YourFolder in the version 1.1 update".

Does that make sense?

So to prevent wyUpdate from deleting files and folders then make sure they exist in both the old version and the new version. In the step-by-step walkthrough will tell you to add all the files and folders for every version. Are you doing that?
User avatar
Sam
 
Posts: 2486
Joined: March 8th, 2010, 3:01 am
Location: New Hampshire

Re: wyUpdate.exe deletes empty folders

Postby Pekka » September 12th, 2011, 2:42 pm

Hey Sam,

I made a new simple wyUpdate project and noticed again that empty folder is removed even if it exists in the new version. I believe you could verify this by making a tiny project that has only one text file and an empty folder in version 1.0. Then make version 1.1 which has also one text file and the same empty folder. Do any change into the text file. Then let wyUpdate update version 1.0 to 1.1. and check if the empty folder still exists or not.

In my real program I found a way to avoid this problem by putting a dummy text file into all empty folders. Then the empty folders are not removed by wyUpdate.
Pekka
 

Re: wyUpdate.exe deletes empty folders

Postby kashikoi » September 15th, 2011, 2:50 pm

I have noticed the exact same problem. For now I will also use a dummy file so that empty files don't get deleted during updates.
kashikoi
 

Re: wyUpdate.exe deletes empty folders

Postby kashikoi » September 15th, 2011, 3:41 pm

Regarding use of a dummy file:

You can actually just add it to the wyBuild project only in the "Files & Folder" screen; they don't need to be in your installed software.

The dummy file never changes between versions so it is never included in the incremental wyBuild updates; so even if the dummy file is not in your installed product, wyUpdate won't know and won't download the "catch-all" update.

Also, since the dummy file is added to the "Files & Folder" screen, wyUpdate won't delete the empty folder since it thinks it's not empty.
kashikoi
 

Re: wyUpdate.exe deletes empty folders [Solved]

Postby Wyatt » February 29th, 2012, 3:16 am

wyBuild 2.6.16 is now out -- this bug is fixed.
User avatar
Wyatt
Site Admin
 
Posts: 3383
Joined: July 11th, 2007, 10:30 pm
Location: New Hampshire


Return to wyBuild, wyUpdate, & AutomaticUpdater Support