Skip to content

Commit e9ae4d7

Browse files
committed
fix: Remove extra escapeString from DirectoryLevelTree
1 parent 7fc8829 commit e9ae4d7

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DirectoryManager/DirectoryLevelTree.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ def getTreeType(self):
2424
def findDir(self, path, connection=False):
2525
"""Find directory ID for the given path"""
2626

27-
dpath = self.db._escapeString(os.path.normpath(path))
28-
if not dpath["OK"]:
29-
return dpath
30-
dpath = dpath["Value"]
27+
dpath = os.path.normpath(path)
3128
req = "SELECT DirID,Level from FC_DirectoryLevelTree WHERE DirName=%s"
3229
result = self.db._query(req, conn=connection, args=(dpath,))
3330
if not result["OK"]:
@@ -42,12 +39,7 @@ def findDir(self, path, connection=False):
4239

4340
def findDirs(self, paths, connection=False):
4441
"""Find DirIDs for the given path list"""
45-
dpathList = []
46-
for path in paths:
47-
dpath = self.db._escapeString(os.path.normpath(path))
48-
if not dpath["OK"]:
49-
return dpath
50-
dpathList.append(dpath["Value"])
42+
dpathList = [os.path.normpath(x) for x in paths]
5143
req = "SELECT DirName,DirID from FC_DirectoryLevelTree WHERE DirName in ("
5244
req += ",".join(["%s"] * len(dpathList))
5345
req += ")"

0 commit comments

Comments
 (0)