This commit is contained in:
dsyoon
2023-07-08 15:14:35 +09:00
parent e3f16329f5
commit 3404e705a6

View File

@@ -1002,7 +1002,7 @@ if __name__ == "__main__":
dayList = os.listdir(outPath)
for dayDir in dayList:
if dayDir[0] != '.' and dayDir < before_7_day.strftime("%Y%m%d"):
if os.path.exists(os.path.join(outPath, dayDir)):
if os.path.exists(os.path.join(outPath, dayDir)) and os.path.isdir(os.path.join(outPath, dayDir)):
shutil.rmtree(os.path.join(outPath, dayDir))
outPath = os.path.join(outPath, day)