Fix: ensure loaded path is folder and not file #104812
@ -51,6 +51,12 @@ ext_list = ['.bmp',
|
||||
fakeUser = False
|
||||
|
||||
def LoadBrushSet(filepath, filename):
|
||||
|
||||
# Ensure filepath is a path and not a file (this can happen when the user selects a file within the folder)
|
||||
if os.path.isfile(filepath):
|
||||
path, file = os.path.split(filepath)
|
||||
filepath = os.path.join(path + "\\")
|
||||
|
||||
for file in os.listdir(filepath):
|
||||
path = (filepath + file)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user