Repository navigation
feat(sync): let ignored paths stay untouched in the outputs, so a second Syncthing connection keeps its files - #56
Conversation
…ond sync tool can keep its files there Since 0.8.0 the orphan pass treats ignored sources as absent, and it has always removed unaccounted audio and .lrc files and empty folders anywhere in an output. A second Syncthing connection on an output folder keeps its own .stfolder, .stignore and .stversions there, and loses its versions and its folder marker to that cleanup. settings.ignored_files_in_outputs (default false) makes the ignored_files entries also match paths relative to each output folder. A matching folder, and everything in it, is skipped by the orphan cleanup, the empty-folder cleanup, a source folder delete, force_reencode and the stale temp sweep. Files the watcher writes itself (audio, .lrc, .tmp__ff, the manifest) are protected only through a matching folder, so an entry such as **/*.wav never freezes a WAV output. With the key unset nothing changes. Closes #55
…puts example The example for ignored_files_in_outputs listed only .stfolder, .stignore and .stversions. A second Syncthing connection also writes .syncthing.<name>.tmp files next to the files it downloads, in any folder of the output. A force_reencode purge or the cleanup after a source folder is deleted still removed those, so a user who copied the example did not get an output that is fully left alone. The example now adds "**/.syncthing.*", and tests pin that this entry keeps the temp files through a purge and a source folder delete.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
+ Coverage 96.40% 96.47% +0.07%
==========================================
Files 10 10
Lines 1750 1786 +36
Branches 352 363 +11
==========================================
+ Hits 1687 1723 +36
Misses 33 33
Partials 30 30
🚀 New features to boost your workflow:
|
…n the output folders (#57) Moves the version to 0.9.0 and dates the CHANGELOG for #56, with thanks to @delete-44 for the report in #55.
Problem
Since 0.8.0 (#52),
ignored_filesmakes the listed paths count as absent from the source. The cleanup in each output folder then removes audio and.lrcfiles that no source accounts for, and empty folders, anywhere in the output.When a second Syncthing connection syncs an output folder, it keeps its own
.stfolder,.stignoreand.stversionsthere. The cleanup removes that connection's versions and its empty.stfoldermarker, and Syncthing stops a folder whose marker is missing. Closes #55.Fix
A new key,
settings.ignored_files_in_outputs, takes true or false. The default is false.When it is true, the same
ignored_filesentries also match paths relative to each output folder. The rules are the same as on the source side:**/matches at any depth.*,?and[...]work as patterns.What the key protects:
.lrc,.tmp__ffand manifest files are protected only through a matching folder, so**/*.wavnever freezes a WAV output.force_reencodeWith the key unset or false, nothing changes.
Verification
ruff checkandruff format --checkare clean.keepargument, or the**/.syncthing.*entry..stfolderwith and without its marker file,.stignore, and.stversionswith versioned audio and.lrc. The output also had.syncthing.*.tmpfiles. The run covered:force_reencodeSummary by CodeRabbit
ignored_files_in_outputssetting, disabled by default. When enabled, matching folders in output locations and their contents are preserved during syncing, cleanup, and forced re-encoding.