Skip to content
Snippets Groups Projects
Commit b432fd7b authored by Mayr, Hannes's avatar Mayr, Hannes
Browse files

Allow publishing data to a directory with trailing slash.

parent 6f562b0a
No related branches found
No related tags found
7 merge requests!41Include latest changes in main branch,!37Merge dev upstream changes into improve/metadata,!34Include architecture diagram in docs,!32SAST implementation,!27Update documentation and version number,!26Merge !23, !24, !25 into main,!20Allow publishing data to a directory with trailing slash.
Pipeline #786937 passed
...@@ -56,5 +56,5 @@ IMGS_AS_LIST = [IMG1, IMG2] ...@@ -56,5 +56,5 @@ IMGS_AS_LIST = [IMG1, IMG2]
# plots or images. # plots or images.
publish(['../README.md', '../docs', '../LICENSE'], publish(['../README.md', '../docs', '../LICENSE'],
'/home/chief/Dokumente/fst/plotid_python/data', '/home/chief/Dokumente/fst/plotid_python/data/',
TAGGED_FIGS, 'Bild') TAGGED_FIGS, 'Bild')
...@@ -55,6 +55,13 @@ class PublishOptions: ...@@ -55,6 +55,13 @@ class PublishOptions:
self.data_storage = data_storage self.data_storage = data_storage
self.dst_path_head, self.dst_dirname = os.path.split(self.dst_path) self.dst_path_head, self.dst_dirname = os.path.split(self.dst_path)
# If the second string after os.path.split is empty,
# a trailing slash was given.
# To get the dir name correctly, split the first string again.
if not self.dst_dirname:
self.dst_path_head, self.dst_dirname = os.path.split(
self.dst_path_head)
def validate_input(self): def validate_input(self):
""" """
Validate if input for PublishOptions is correct type. Validate if input for PublishOptions is correct type.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment