From c03a50aa108cd83bea2749275369e09d9af57d40 Mon Sep 17 00:00:00 2001 From: GoatGeek Date: Wed, 16 Jun 2021 03:52:38 -0700 Subject: [PATCH] fix: fixed error with relpath on different drives --- rage-lint.py | 8 ++++---- rage-lint.version | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rage-lint.py b/rage-lint.py index 5e4ecdf..97b7e1c 100644 --- a/rage-lint.py +++ b/rage-lint.py @@ -3,13 +3,13 @@ import os.path import sys import time -from os.path import relpath, realpath, dirname, exists +from os.path import abspath, realpath, dirname, exists from urllib import request from colored import fg, attr from lxml import etree -__VERSION__ = '0.0.1' +__VERSION__ = '0.0.2' def silly_log(s): @@ -30,7 +30,7 @@ def debug(s): dataDir = sys._MEIPASS xsdSchema = None -schemaPath = relpath(dataDir + '/schema.xsd') +schemaPath = abspath(dataDir + '/schema.xsd') if exists(schemaPath): schemaAge = time.time() - (os.stat(schemaPath)).st_mtime # remove cached after 1 week @@ -97,7 +97,7 @@ def handle_skip(path, msg): print("%sFound %d file%s to lint...%s\n" % (fg('cyan'), len(files), 's' if len(files) > 0 else '', attr(0))) for file in files: - relative_file_path = os.path.relpath(file) + relative_file_path = realpath(file).replace(os.getcwd(), './') print(("Linting %s%s%s" % (fg('yellow'), relative_file_path, attr(0))).ljust(75), end="", file=sys.stderr) try: doc = etree.parse(file, parser=etree.XMLParser(remove_comments=True)) diff --git a/rage-lint.version b/rage-lint.version index a9e4158..37fd67b 100644 --- a/rage-lint.version +++ b/rage-lint.version @@ -1,7 +1,7 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(0, 0, 1, 4), - prodvers=(0, 0, 1, 4), + filevers=(0, 0, 2, 0), + prodvers=(0, 0, 2, 0), mask=0x3f, flags=0x0, OS=0x40004, @@ -16,12 +16,12 @@ VSVersionInfo( u'040904B0', [StringStruct(u'CompanyName', u'GoatGeek'), StringStruct(u'FileDescription', u'RAGE Metafile Linter'), - StringStruct(u'FileVersion', u'0.0.1'), + StringStruct(u'FileVersion', u'0.0.2'), StringStruct(u'InternalName', u'rage-lint'), StringStruct(u'LegalCopyright', u'\xa9 GoatGeek - Licensed under the MIT License'), StringStruct(u'OriginalFilename', u'rage-lint.exe'), StringStruct(u'ProductName', u'RAGE Metafile Linter'), - StringStruct(u'ProductVersion', u'0.0.1')]) + StringStruct(u'ProductVersion', u'0.0.2')]) ]), VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) ]