Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
WinGUP causes download failure by using plugin download URL to generate file name to store downloaded file #9
According to this list the plugin Kstudio.MaxscriptExplorer has a download issues with WinGup v5.0.4.
I have debugged this issue and found that WinGup uses the file name part of the plugin download URL to generate the file name used to store the downloaded file. Additionally, if the file name doesn't end with .zip this string gets appended.
In case of Kstudio.MaxscriptExplorer this leads to an illegal file name since the download URL of this plugin is
The contained question mark is an illegal character for filesystem objects, thus the download fails because the file can not be stored.
WinGup should test the generated file name for illegal characters and remove them.
changed the title
WinGUP causes download failure by using plugin download URL to generate directory name to store downloaded file
Dec 2, 2018
In the meanwhile I found another plugin that can not be downloaded due to this issue, the Poor Man's T-Sql Formatter plugin.
Its download link is
Again, there is a question mark that causes the download to fail because the local destination file can not be created.
Hi - Poor Man's T-Sql Formatter dev here - without understanding the mechanism of the failure, I posted a thread on this in the community forums: https://notepad-plus-plus.org/community/topic/16940/gup-exe-crashes-on-some-zip-files-and-http-hosts. @dinkumoil helpfully pointed me here.
It's worth noting that I've added a new official download location for the Poor Man's T-Sql Formatter plugin, in a GitHub release (https://github.com/TaoK/PoorMansTSqlFormatter/releases/tag/1.6.10), so this is no longer a blocker for this particular plugin.
It can still easily be a significant cause of frustration for other plugin devs who spend a bunch of time debugging why their plugin won't install. Unfortunately, GUP.exe's UI-less crash here is particularly unhelpful.
referenced this issue
Apr 27, 2019
I just ran into the same problem with the PreviewHTML plugin, because I need query string parameters on the download URL. The Appveyor PR commit check doesn't complain, because it’s a perfectly valid URL.
Is there any reason to actually use the URL as basis for the downloaded file? Since it's going to be unzipped anyway, I would expect that a random temporary file name would work just as well (if not better). Alternatively, if the URL-as-basis-for-the-filename is wanted, I suggest chopping off the part after the question mark, at the very least. And always check the resulting file name for invalid characters.
Also, reporting the failure somewhere would be nice, too.