Sfoglia il codice sorgente

synergine2_cocos2d/middleware.py: More trailing '/'

Tom Low-Shang 6 anni fa
parent
commit
37d72e033f
1 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 2 4
      synergine2_cocos2d/middleware.py

+ 2 - 4
synergine2_cocos2d/middleware.py Vedi File

@@ -4,6 +4,7 @@ import os
4 4
 import cocos
5 5
 from synergine2.config import Config
6 6
 from synergine2.log import get_logger
7
+from synergine2_cocos2d.util import get_map_file_path_from_dir
7 8
 
8 9
 
9 10
 class MapMiddleware(object):
@@ -18,10 +19,7 @@ class MapMiddleware(object):
18 19
         self.tmx = None
19 20
 
20 21
     def get_map_file_path(self) -> str:
21
-        return os.path.join(
22
-            self.map_dir_path,
23
-            '{}.tmx'.format(os.path.basename(self.map_dir_path)),
24
-        )
22
+        return get_map_file_path_from_dir(self.map_dir_path)
25 23
 
26 24
     def init(self) -> None:
27 25
         map_file_path = self.get_map_file_path()