Skip to content

Fix LT-21913: Prevent crash when restoring over an open project#986

Merged
mark-sil merged 1 commit into
mainfrom
LT-21913
Jul 2, 2026
Merged

Fix LT-21913: Prevent crash when restoring over an open project#986
mark-sil merged 1 commit into
mainfrom
LT-21913

Conversation

@mark-sil

@mark-sil mark-sil commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Restoring a backup over a project that was open (and therefore file-locked) overwrote the project's data and then crashed.

Fix it in two places:

  • RestoreCurrentProject now checks if the project is locked before doing anything destructive (overwriting files).

  • ExecuteWithAppsShutDown adds a narrow safety net that catches a LcmFileLockedException when reopening. This covering the small window where the project could get locked between the up-front check and the reopen. Any other StartupException is left to propagate so unexpected failures still generate a crash report.


This change is Reviewable

Restoring a backup over a project that was open (and therefore file-locked)
overwrote the project's data and then crashed.

Fix it in two places:
- RestoreCurrentProject now checks if the project is locked before doing
anything destructive (overwriting files).

- ExecuteWithAppsShutDown adds a narrow safety net that catches a
LcmFileLockedException when reopening. This covering the small window
where the project could get locked between the up-front check and the
reopen. Any other StartupException is left to propagate so unexpected
failures still generate a crash report.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   10m 42s ⏱️ +3s
4 299 tests ±0  4 226 ✅ ±0  73 💤 ±0  0 ❌ ±0 
4 308 runs  ±0  4 235 ✅ ±0  73 💤 ±0  0 ❌ ±0 

Results for commit 14f5ce1. ± Comparison against base commit 323a022.

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@jasonleenaylor reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on mark-sil).

@mark-sil mark-sil merged commit 906e569 into main Jul 2, 2026
7 checks passed
@mark-sil mark-sil deleted the LT-21913 branch July 2, 2026 18:02
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

Successfully merging this pull request may close these issues.

2 participants