From 945fa22703037593544f3ea0c93913d562cf1532 Mon Sep 17 00:00:00 2001 From: beierlm Date: Mon, 4 Apr 2022 11:44:03 -0400 Subject: [PATCH] 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 --- osm_common/fsmongo.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.25.1