Skip to content

Hashes in filenames #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cwltool/draft2tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from .utils import aslist

ACCEPTLIST_EN_STRICT_RE = re.compile(r"^[a-zA-Z0-9._+-]+$")
ACCEPTLIST_EN_RELAXED_RE = re.compile(r"^[ a-zA-Z0-9._+-]+$") # with spaces
ACCEPTLIST_EN_RELAXED_RE = re.compile(r"^[ #a-zA-Z0-9._+-]+$") # with spaces and hashes
ACCEPTLIST_RE = ACCEPTLIST_EN_STRICT_RE

from .flatten import flatten
Expand Down
2 changes: 1 addition & 1 deletion cwltool/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def tool_resolver(document_loader, uri):
ret = r(document_loader, uri)
if ret is not None:
return ret
return file_uri(os.path.abspath(uri))
return file_uri(os.path.abspath(uri), split_frag=True)
3 changes: 2 additions & 1 deletion cwltool/stdfsaccess.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import glob
import os
import urllib

from schema_salad.ref_resolver import file_uri
from typing import BinaryIO, Text
Expand Down Expand Up @@ -30,7 +31,7 @@ def isdir(self, fn): # type: (Text) -> bool
return os.path.isdir(self._abs(fn))

def listdir(self, fn): # type: (Text) -> List[Text]
return [abspath(l, fn) for l in os.listdir(self._abs(fn))]
return [abspath(urllib.quote(str(l)), fn) for l in os.listdir(self._abs(fn))]

def join(self, path, *paths): # type: (Text, *Text) -> Text
return os.path.join(path, *paths)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
'ruamel.yaml >= 0.12.4',
'rdflib >= 4.2.2, < 4.3.0',
'shellescape >= 3.4.1, < 3.5',
'schema-salad >= 2.2.20170216125639, < 3',
'schema-salad >= 2.2.20170222151604, < 3',
'typing >= 3.5.2, < 3.6'
],
setup_requires=[] + pytest_runner,
Expand Down