mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-24 20:33:04 +00:00
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:
parent
6bccfd315c
commit
b12d8576d9
2 changed files with 5 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,4 +5,5 @@
|
|||
*.DS_STORE
|
||||
db.*
|
||||
venv*
|
||||
node_modules
|
||||
node_modules
|
||||
.vscode
|
||||
|
|
|
@ -39,7 +39,9 @@ imageDir = os.getcwd() + '/data/v2/sprites/'
|
|||
resourceImages = []
|
||||
for root, dirs, files in os.walk(imageDir):
|
||||
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}'
|
||||
|
|
Loading…
Reference in a new issue