Skip to content

Commit 384e97d

Browse files
committed
"not prefix" did not match properly
1 parent 296e32c commit 384e97d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiita_client/qiita_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def fetch_file_from_central(self, filepath, prefix=None):
773773
str : the filepath of the requested file within the local file system
774774
"""
775775
target_filepath = filepath
776-
if not prefix:
776+
if (prefix is not None) and (prefix != ""):
777777
# strip off root
778778
if filepath.startswith(os.path.abspath(os.sep)):
779779
target_filepath = target_filepath[
@@ -782,7 +782,7 @@ def fetch_file_from_central(self, filepath, prefix=None):
782782
target_filepath = os.path.join(prefix, target_filepath)
783783

784784
if self._plugincoupling == 'filesystem':
785-
if not prefix:
785+
if (prefix is not None) and (prefix != ""):
786786
# create necessary directory locally
787787
os.makedirs(os.path.dirname(target_filepath), exist_ok=True)
788788

0 commit comments

Comments
 (0)