Skip to content

Commit

Permalink
fix: fixed error with relpath on different drives
Browse files Browse the repository at this point in the history
  • Loading branch information
GoatG33k committed Jun 16, 2021
1 parent 4f65326 commit c03a50a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions rage-lint.py
Expand Up @@ -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):
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand Down
8 changes: 4 additions & 4 deletions 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,
Expand All @@ -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])])
]
Expand Down

0 comments on commit c03a50a

Please sign in to comment.