Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

Commit

Permalink
Fixes #573 - ADD fails for directory (#610)
Browse files Browse the repository at this point in the history
* Adding fixes self.base_path and parse_ADD

* Isolated fix to #573
  • Loading branch information
josiahg authored and Chris Houseknecht committed Jun 16, 2017
1 parent 74ccfa1 commit 22902db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion container/docker/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def parse_LABEL(self, payload, comments):
if '=' in label:
k, v = label.split('=', 1)
elif ' ' in label:
# handle: 'maintainer me@foobar.com'
# handle: 'maintainer me@foobar.com'
k, v = shlex.split(label)
else:
continue
Expand Down Expand Up @@ -331,6 +331,8 @@ def parse_ADD(self, payload, comments, url_and_tarball=True):
]))

for src_spec in src_list:
if os.path.isdir(os.path.join(self.path, src_spec)):
url_and_tarball = False
# ADD src can be a URL - look for a scheme
if url_and_tarball and urlparse(src_spec).scheme in ['http', 'https']:
task = CommentedMap()
Expand Down

0 comments on commit 22902db

Please sign in to comment.