-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add mechanism to resolve updates #46
Conversation
@ctrueden do you mind testing this on a non-Windows system? I just made a new file in the We're currently missing special logic to handle updating launcher files 😬 any thoughts there? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! 👍
Do you think we can get away with not having an explicit stat()
function?
These file manipulation functions are necessary to complete ImageJ-style application updates.
I rebased over the latest main branch, and changed |
@hinerm I updated the |
I did find one limitation in my tests: if there is a file in the |
All seems good on windows |
This assumes there is an "update" app subdirectory with a directory structure shadowing that of the main app. Empty update files signify the corresponding app file should be deleted; otherwise files are copied from the update structure to their equivalent app location. The update directory and any remaining contets are deleted. Co-authored-by: Curtis Rueden <[email protected]>
And make the Windows File code more DRY between length and lines().
The function will always be there on Windows. And if it's not, we'll now fail with NPE instead of RuntimeException. Either way it's a crash. *shrug*
Necessary in case there are files in a new subdirectory structure.
@ctrueden ok, making empty intermediate directories should work now. Anything else before merging? |
@ctrueden supposedly this was fixed in 1.6.0 so I don't know why it's a problem? |
So that we can have a separate mkdir function for each, without replicating the code across x64 and arm64.
It's more succinct, and just as clear (to us ;-).
Whew! Finally working on all platforms. 😌 |
Fixes #3.