Skip to content

[Bug] Running from a synced folder locks the updater from relaunching. #85

@vectorcmdr

Description

@vectorcmdr

Summary

As reported on Discord, sync software will block the relaunch after update.

Confirm the following statements

  • I have checked that this issue is relevant to the latest release of NMSE.
  • I have searched the issue tracker and found no duplicate.
  • I have searched the documentation and found nothing matching this issue.
  • This issue contains only one bug report.
  • I have read and agree to follow the code of conduct.

Description

Syncing software will often lock a new file for hashing and then upload, preventing the application from successfully relaunching after updating itself.

Expected behavior

The application should ideally be able to relaunch itself in a sync software monitored folder.

Steps to reproduce

  1. Place software in a sync software monitored folder.
  2. Update.

Environment

N/A

Acceptance criteria

  • More robust ability to relaunch.
  • Does not increase AV heuristic false positives due to aggressive process / application manipulation or privilege escalation.

Additional information

Thoughts:

  • Add a simple wait for ~10 seconds ontop of relaunch execution fail to await file lock for hashing by sync software.
  • Use UseShellExecute = true for a different kernel path for the call that may be more successful in stong-arming the sync softwares lock.
  • Wrap Process.Start in a retry loop with a max time falldown and a throw to inform manual relaunch is required.
  • Show an additional prompt if detected as running in a sync folder when updating to inform the user that it may interfere and that they might need to manually relaunch.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingc: APIAPI relatedc: editor frontendEditor frontend/UI relatedconfirmedItem has been reproduced or confirmedpriority: highHigh priority item

Projects

Status

Confirmed Features & Fixes

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions