Update MgrCalibreDB.py, UI.py, and 4 more files...

This commit is contained in:
2025-01-07 02:41:54 +09:00
parent 7587da53b3
commit 6fe1cf8da0
6 changed files with 116 additions and 21 deletions

View File

@@ -223,7 +223,6 @@ def CreateZIPShell(zipName, *files, bRmvRPath = True):
command += strTemp
# for item in file:
# command += f"\"{item}\" "
@@ -235,6 +234,7 @@ def CreateZIPShell(zipName, *files, bRmvRPath = True):
return bRet
# 특정 확장자만 쉘을 이용해서 압축한다
def CreateZIPShExt(zipName, TrgExt):
command = f"zip -j {zipName} *.{TrgExt}"
@@ -247,6 +247,7 @@ def CreateZIPShExt(zipName, TrgExt):
return bRet
# 압축 파일 내의 모든 파일 및 디렉토리 목록 가져오기
def GetZipContentList(path):
if None == path or not os.path.isfile(path):
@@ -258,6 +259,7 @@ def GetZipContentList(path):
return listRet
def GetZippedFileByte(pathZip, FileName):
if None == pathZip or not os.path.isfile(pathZip):
return None
@@ -285,11 +287,13 @@ def PrintJSONTree(data, indent=0):
else:
print(' ' * indent + str(data))
def IsPathWithin(base_path: str, target_path: str) -> bool:
base = Path(base_path).resolve()
target = Path(target_path).resolve()
return target.is_relative_to(base)
# 랜덤 UUID 생성
def UUIDGenRandom():
random_uuid = uuid.uuid4()