From 527e345366268327f9d1157324a06d888f42c4d5 Mon Sep 17 00:00:00 2001 From: Florent Pigout Date: Tue, 25 Oct 2011 03:18:32 +0000 Subject: ensure good resource init for real target --- diff --git a/atoidejouer/tools/storage.py b/atoidejouer/tools/storage.py index 9552130..59e1e79 100644 --- a/atoidejouer/tools/storage.py +++ b/atoidejouer/tools/storage.py @@ -402,12 +402,15 @@ def add_file_to_journal(file_name, file_path, mime_type): def __check_file_in_journal(sub_path, file_name, mime_type=None): + # dummy + if file_name in ['blank']: + return # is already in the journal - if is_in_journal(file_name, mime_type): + elif is_in_journal(file_name, mime_type): pass else: # file path - _path = os.path.join(ROOT, 'data', sub_path, file_name) + _path = os.path.join(BUND, 'static', 'ext', sub_path, file_name) # ensure dir exist in bundle add_file_to_journal(file_name, _path, mime_type) @@ -417,12 +420,7 @@ def __check_dir_files(sub_path, mime_type=None, in_journal=False): _path = os.path.join(BUND, 'static', 'ext', sub_path) # file by file for _f in os.listdir(_path): - # full path - _p = os.path.join(_path, _f) - # little check - if os.path.isdir(_p) or _f in ['blank']: - pass - elif in_journal is True: + if in_journal is True: __check_file_in_journal(sub_path, _f, mime_type=mime_type) else: __check_file_in_bundle(sub_path, _f) -- cgit v0.9.1