Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not crash if the %LocalAppData%\MyApp folder exists, but not the RELEASES file #54

Closed
christianrondeau opened this issue Sep 25, 2014 · 3 comments

Comments

@christianrondeau
Copy link
Contributor

I now get this error:

CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\username\AppData\Local\MyApp\packages\RELEASES'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Squirrel.UpdateManager.CheckForUpdateImpl.LoadLocalReleases(String localReleaseFile)
   at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__38.MoveNext()

An missing 'RELEASES' file should be treated like a missing app directory IMHO.

@anaisbetts
Copy link
Contributor

Are you sure that this is the crash? This caught exception shows up in the logs by default and is expected

@christianrondeau
Copy link
Contributor Author

Well, I think you may be right; the setup itself throws, but it also happened that it crash without that error, so I'll dig deeper and get back to you.

@christianrondeau
Copy link
Contributor Author

You are correct, I tested on another machine and had no errors. I'm closing this (though I feel that errors and warnings should be handled differently, i.e. avoid exceptions and do not show stack trace. In that case, checking if the file exists rather than catching an exception. That's a matter of taste and I'll let you decide what to make of it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants