From: beierlm Date: Mon, 4 Apr 2022 15:44:03 +0000 (-0400) Subject: Bug 1977: FSMongo Reverse Sync X-Git-Tag: v12.0.0rc1~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=945fa22703037593544f3ea0c93913d562cf1532;p=osm%2Fcommon.git Bug 1977: FSMongo Reverse Sync Directories represented by a symlink are not stored properly on reverse sync, resulting in empty directories being created instead of preserving the link Fixes Bug 1977 Change-Id: Ia6a3b3dfdfde498751a79e04b2824ac38d0b7feb Signed-off-by: beierlm --- diff --git a/osm_common/fsmongo.py b/osm_common/fsmongo.py index b04057e..487eaf8 100644 --- a/osm_common/fsmongo.py +++ b/osm_common/fsmongo.py @@ -557,6 +557,8 @@ class FsMongo(FsBase): for root, dirs, files in os.walk(os_path): for folder in dirs: member = {"filename": os.path.join(root, folder), "type": "dir"} + if os.path.islink(member["filename"]): + member["type"] = "sym" members.append(member) for file in files: filename = os.path.join(root, file)