Skip to content

Commit

Permalink
Bug fix for path validation
Browse files Browse the repository at this point in the history
  • Loading branch information
pramberg451 committed Jul 6, 2020
1 parent 39f6c8b commit f9c61ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gwentImageGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def generateCards(self, imagePath, gwentPath):
numberOfCards = len(cardsToGenerate)
cardsCompleted = 0

if not gwentPath or not gwentPath.endswith("GWENT The Witcher Card Game") or not gwentPath.endswith("Gwent"):
if not gwentPath or not (gwentPath.endswith("GWENT The Witcher Card Game") or gwentPath.endswith("Gwent")):
messagebox.showerror("No Gwent Path", "Path to Gwent installation was invalid or not specified.")
return
if not imagePath:
Expand Down Expand Up @@ -401,7 +401,7 @@ def generateCardData(self, filename, progressBar, jsonWindow, gwentPath):
if filename == "":
messagebox.showerror("No File Name", "No file name was specified.")
return
if not gwentPath or not gwentPath.endswith("GWENT The Witcher Card Game") or not gwentPath.endswith("Gwent"):
if not gwentPath or not (gwentPath.endswith("GWENT The Witcher Card Game") or gwentPath.endswith("Gwent")):
messagebox.showerror("No Gwent Path", "Path to Gwent installation was invalid or not specified.")
return
cards = {}
Expand Down

0 comments on commit f9c61ca

Please sign in to comment.