Bug 1989 Do not use trailing / for directory 80/11880/1
authorbeierlm <mark.beierl@canonical.com>
Wed, 13 Apr 2022 10:28:58 +0000 (06:28 -0400)
committerbeierlm <mark.beierl@canonical.com>
Wed, 13 Apr 2022 10:28:58 +0000 (06:28 -0400)
When storing package contents in fsmongo, the tar format does not have a trailing
/ on directories, but zip format does.  As a result, when searching for the charm
directory, logic was added to append the / on the end of the directory name.

This is no longer needed as the reverse sync is being used now to store package
content and it handles directory names properly.

Fixes bug 1989

Change-Id: I31540c817113f393e222ae47c3420f374769e3ed
Signed-off-by: beierlm <mark.beierl@canonical.com>
osm_nbi/descriptor_topics.py

index 072485a..4661964 100644 (file)
@@ -973,7 +973,6 @@ class VnfdTopic(DescriptorTopic):
             if file:
                 return self.fs.file_exists("{}/{}".format(f, file), "file")
             else:
             if file:
                 return self.fs.file_exists("{}/{}".format(f, file), "file")
             else:
-                f = f+"/"
                 if self.fs.file_exists(f, "dir"):
                     if self.fs.dir_ls(f):
                         return True
                 if self.fs.file_exists(f, "dir"):
                     if self.fs.dir_ls(f):
                         return True