diff --git a/app.py b/app.py index bc05162..bc0473c 100644 --- a/app.py +++ b/app.py @@ -25,6 +25,7 @@ if importlib.util.find_spec("win32com"): from win32com.client import * + WINDOWS = True def get_version_number(file_path): information_parser = Dispatch("Scripting.FileSystemObject") print(information_parser) @@ -32,6 +33,7 @@ def get_version_number(file_path): return version VERSION = f'v{get_version_number(sys.argv[0])}' else: + WINDOWS = False VERSION = 'DEV VERSION' @@ -300,7 +302,7 @@ def creation_date(self, path_to_file): last modified if that isn't possible. See http://stackoverflow.com/a/39501288/1709587 for explanation. ''' - if platform.system() == 'Windows': + if platform.system() == 'Windows' or WINDOWS: return os.path.getctime(path_to_file) else: stat = os.stat(path_to_file)