Conversation
When Postie processes a watched folder (SingleNzbPerFolder or explicit folder upload), generated NZB and PAR2 files are now placed inside a dedicated <outputDir>/<folderName>/ subdirectory instead of directly in the output root. Before this fix, postFolder() used: nzbPath = filepath.Join(outputDir, folderName+".nzb") par2OutputDir = outputDir Both paths now use folderOutputDir = filepath.Join(outputDir, folderName), so the layout becomes: <outputDir>/Movie_A/Movie_A.nzb <outputDir>/Movie_A/*.par2 (when maintain_par2_files=true) This fixes the cross-volume case (watch folder and output folder on different mount points) where files were previously scattered in the output root. The fix covers both the sequential (WaitForPar2=true) and parallel (WaitForPar2=false) code paths. Also bumps Node.js to v22 in CI workflows and adds tests covering: - Sequential and parallel paths with maintain_par2_files=false - Sequential and parallel paths with maintain_par2_files=true (peer files) - Explicit cross-volume path separation scenario
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
postFolder()placed NZB and PAR2 files directly inoutputDir(filepath.Join(outputDir, folderName+".nzb")), so all generated files landed in the output root with no subfolder grouping.folderOutputDir := filepath.Join(outputDir, folderName)and use it for both NZB path andpar2OutputDirin the sequential and parallel branches ofpostFolder().<outputDir>/<folderName>/<folderName>.nzband<outputDir>/<folderName>/*.par2, fixing the cross-volume case where watch and output are on different mount points.Before / After
Before (broken — cross-volume and same-volume):
After:
Test plan
TestPostFolderOutputSubdirectory— NZB lands in subfolder for sequential and parallel paths (5 sub-cases)TestPostFolderMaintainPar2FilesSubdirectory— PAR2 executor receives subfolder as outputDir whenmaintain_par2_files=true(peer files); PAR2 files are in subfolder, not output rootTestPostFolderCrossVolumePathSeparation— explicit cross-volume simulation; output root contains only the named subdirectorygo test ./pkg/postie/...passesRelated #168