summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben@demerara.io>2022-02-05 13:43:40 +0000
committerBen Brown <ben@demerara.io>2022-02-05 13:43:40 +0000
commit7008cc18394bdc508b0d201513961aeb01811bdd (patch)
tree8d54bab735601f74d9f5d7b6a2a72be09e8f46c2
parent42631fd09d543d60b96de3ddea4a05892f82d728 (diff)
downloadlorry-7008cc18394bdc508b0d201513961aeb01811bdd.tar.gz
Set 'destination' field as optional
-rw-r--r--README.md6
-rwxr-xr-xlorry2
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 302b443..c322ba3 100644
--- a/README.md
+++ b/README.md
@@ -290,9 +290,9 @@ Lorry can store raw files in a git LFS repository, which may allow your git
server to serve those files via its repository browser.
For convenience, raw file lorries can specify multiple sources to store in the
-same repository. Each raw file will be stored under a subpath corresponding to
-the source name, specify `.` to store the raw file at the root of the
-repository.
+same repository. By default each raw file will be stored at the root of the
+repository, unless otherwise specified by the optional `destination` field,
+which specifies the subdirectory under which the raw file will be stored.
{
"raw-file-repo": {
diff --git a/lorry b/lorry
index b52b563..83e22de 100755
--- a/lorry
+++ b/lorry
@@ -813,7 +813,7 @@ class Lorry(cliapp.Application):
file_dest = os.path.join(dirname, basename)
self.progress('.. checking if we need to fetch %s' % basename)
if file_missing_or_empty(file_dest):
- new_files.append((src['destination'], file_dest))
+ new_files.append((src.get('destination', '.'), file_dest))
self.progress('.. attempting to fetch %s' % basename)
try:
with open(file_dest, 'wb') as raw_file, \