Error: File name too long...Locked

Hi Wyatt.

Today I tried a full-scale update test on my product (the full product includes a large number of files and folders, about 470 Mb in total).

I made two different versions of my product and registered them in wyBuild. Generation of update files and upload to ftp-server worked like a charm, but when my product finally tried to update itself the AutomaticUpdater control reported the following error:

"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters." and the update failed.

How can I determine which file causes the error? This is really a showstopper unless I find a good way to work around it! For the present I cannot imagine that the error description is true, because I don't use that long paths names and file names (at least not to my knowledge). Help!

-Martin.

Supplemental info:

I tried to update my product by manually clicking wyUpdate.exe in my product's main folder. This way my product updated without any problems what so ever.

Conclusion: When bypassing the AutomaticUpdater control the update process completes successfully. This means that the AutomaticUpdater control must be faulty somehow...

Ok, I'm going to ask you to do 3 things.

First

Go to Start > Run, and type "%appdata%" (without the quotes) and press enter. It should open a folder like "C:\Users\Wyatt\AppData\Roaming". Tell me what yours reads as.

Second

What's the folder you're installing to? (E.g. C:\Program Files\YourApp\)

Third

Make a copy of your wyBuild project file (*.wyp). Open the copy in wyBuild and delete your FTP upload site. Save the file. Now send this file to me (wyatt@wyday.com). You don't need to send me your files. Just the project file will do.

Lastly, at what step does this happen? (Before the update has extracted? After the update has extracted?, when wyUpdate has started to install the files?)

Ok, we've tracked down the problem. It will be fixed in the upcoming version. (Probably out by Monday or Tuesday next week). Read on if you're interested in what went wrong.

Technical details

As it is now wyUpdate stores the cached update files in an extremely long path names. On Windows Vista/7 the path name is 80 characters + length of your username. Which means that if you have any path over around 130 characters then you'll run into the 260 character limit.

On Windows 2000/XP this problem is a bit worse. Making the Upper limit of your paths to around 110 characters long.

How we'll fix it

The good news is this is fixable. Windows can support paths up to 32,000 characters long. Unfortunately the .NET framework only supports paths of up to 260 characters. (It's a long story, read about it here).

This requires us to modify and retest a significant portion of the installation code. This is why it will take a few days to fix and test.

Hi Wyatt.

Nice that you've tracked down the problem, though it's not clear to my why it works with wyUpdate.exe alone and not with the AutmaticUpdater control...

Are you still interested in the results of the diagnostic steps you asked me to take yesterday?

-Martin.

Nice that you've tracked down the problem, though it's not clear to my why it works with wyUpdate.exe alone and not with the AutmaticUpdater control...

Because wyUpdate operates on 2 modes: standalone mode & automatic update mode. In standalone mode the files are extracted & patched in the temp folder. In automatic update mode the files are extracted & patched in a much longer path that's used for long term storage.

The reason we don't use the temp path for automatic update mode is that the extracted files need to hang around for a while. (Some corporate computers are configured to automatically clear out the temp folder on shutdown. This would throw a wrench into the whole process. Hence the different storage location.)

Are you still interested in the results of the diagnostic steps you asked me to take yesterday?

No. Thanks for spotting this.

Ok, this has been fixed in wyUpdate 2.5.10. Just update to the latest version of wyBuild.