Browse Source

增加判断删除资源是否存在

yhz 6 năm trước cách đây
mục cha
commit
623c209346
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      package_utils_record.py

+ 3 - 2
package_utils_record.py

@@ -167,8 +167,9 @@ def removeOldRes(game, sdk, subChannel, config):
     decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
     for subPath in config['deleteList']:
         resPath = os.path.join(decompliePath, subPath)
-        os.remove(resPath)
-        print('delete ' + resPath)
+        if os.path.exists(resPath):
+            os.remove(resPath)
+            print('delete ' + resPath)
     return 0
 
 def removeOldCode(game, sdk, subChannel, config):