Repository navigation
LRC-LIB-LIBFOLDERS: the engine can locate a folder that is somewhere else now (engine only) #2860
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
eb1e951
LRC-LIB-LIBFOLDERS: the engine locates a folder that is somewhere els…
nledford 7c3bf8d
Record the case-insensitivity test as skipped where the disk tells B …
nledford 2c60166
Merge origin/main (78b575658a) into folder-relocate-engine-pr
nledford d549a95
Merge branch 'main' into folder-relocate-engine-pr
FredApps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Script executed:
Repository: storytold/lightcraft
Length of output: 14994
Script executed:
Repository: storytold/lightcraft
Length of output: 19419
Script executed:
Repository: storytold/lightcraft
Length of output: 3645
Script executed:
Repository: storytold/lightcraft
Length of output: 6440
Script executed:
Repository: storytold/lightcraft
Length of output: 4184
Script executed:
Repository: storytold/lightcraft
Length of output: 7367
Repair the selection when redo removes photos.
Redo applies the relocation batch through
apply_with_fileswithout the selection repair that the relocate commit runs. A selected photo that redo removes stays inselection.idsandselection.active. Capture the visible photos beforeapply_catalog, then callselect_after_deletionwhen a removed photo was selected.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.
Known limit, so I'm not changing it. Only a redo removes photos here: the Local-browsed records a located folder replaces go in the same batch (
Located::commitrunsselect_after_deletionfor them,relocate.rs:564), and redo applies that batch throughapply_with_fileswithout the repair. The engine already tolerates a selected id the catalog no longer has:Session::active()filters it (lib.rs:929), and the album commands drop it first (album_targets: "kept selected after an undo took its photo away"). Undo and redo of other steps leave the selection the same way (apply_throughdoesn't prune it, andshow_undoneonly follows a single photo), so a redo of a located folder is no different. What's left is a stale id in the selection until the next selection change.If it's wanted: capture
visible_cloned()beforeapply_cataloginapply_with_filesand callselect_after_deletionin theSome(f) => relocate::follow_located(...)arm, with a test that redoes a locate that replaced a selected photo.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.
@nledford Understood. The supplied code confirms that
apply_throughdoes not prune the selection andSession::active()filters out missing photos. This is a known undo/redo limitation, not a relocation-specific regression.I accept your decision to leave it unchanged. The stale selection remains, but I will not press for a fix in this PR.
You are interacting with an AI system.