Fix v2 database build script to work on Windows

Image sprite paths should be Unix-style, but the build script used the
OS default, so the process failed on Windows.
This commit is contained in:
Charles Marttinen 2018-06-02 19:29:18 -04:00
parent 6bccfd315c
commit b12d8576d9
2 changed files with 5 additions and 2 deletions

3
.gitignore vendored
View file

@ -5,4 +5,5 @@
*.DS_STORE *.DS_STORE
db.* db.*
venv* venv*
node_modules node_modules
.vscode

View file

@ -39,7 +39,9 @@ imageDir = os.getcwd() + '/data/v2/sprites/'
resourceImages = [] resourceImages = []
for root, dirs, files in os.walk(imageDir): for root, dirs, files in os.walk(imageDir):
for file in files: for file in files:
resourceImages.append(os.path.join(root.replace(imageDir, ""), file)) image_path = os.path.join(root.replace(imageDir, ""), file)
image_path = image_path.replace("\\", "/") # convert Windows-style path to Unix
resourceImages.append(image_path)
mediaDir = '/media/sprites/{0}' mediaDir = '/media/sprites/{0}'