commit 4e7b5c9a0fedeece3adeaecf79ec2088082c5fbc
parent b21f0328661f17285fd3ba321a0ad0d7dc405337
Author: Dan Callaghan <djc@djc.id.au>
Date: Wed, 29 Mar 2023 21:16:11 +1100
load sources.yaml relative to index dir
This only matters in the test suite, which is the only time that Index
is constructed pointing to a custom directory (the test's temp dir).
Fixes test/integration/test_mbox.rb and
test/integration/test_maildir.rb to not try reading my sources from
~/.sup during test execution.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
@@ -99,14 +99,14 @@ EOS
end
def load failsafe=false
- SourceManager.load_sources
+ SourceManager.load_sources File.join(@dir, "sources.yaml")
load_index failsafe
end
def save
debug "saving index and sources..."
FileUtils.mkdir_p @dir unless File.exist? @dir
- SourceManager.save_sources
+ SourceManager.save_sources File.join(@dir, "sources.yaml")
save_index
end