Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2019-11-10 23:33:06 +0300
committerVilém Duha <vilda.novak@gmail.com>2019-11-10 23:33:06 +0300
commit8eead22f9aec631068919f2f17a620d5336e4105 (patch)
treeec1c312a76f0a7598e35734afb97eb802e1c1b8c
parentad051a06e341ec074cda5bf15bba01d5d9e49521 (diff)
BlenderKit: Fix T71276 - paths were handled incorrectly
Slash at the end of global dir path was causing Global only setting not to work.
-rw-r--r--blenderkit/paths.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/blenderkit/paths.py b/blenderkit/paths.py
index 4a9a2cd6..3fc6db5e 100644
--- a/blenderkit/paths.py
+++ b/blenderkit/paths.py
@@ -50,6 +50,7 @@ def get_bkit_url():
url = BLENDERKIT_MAIN
return url
+
def find_in_local(text=''):
fs = []
for p, d, f in os.walk('.'):
@@ -58,9 +59,11 @@ def find_in_local(text=''):
fs.append(file)
return fs
+
def get_api_url():
return get_bkit_url() + BLENDERKIT_API
+
def get_oauth_landing_url():
return get_bkit_url() + BLENDERKIT_OAUTH_LANDING_URL
@@ -86,7 +89,7 @@ def get_temp_dir(subdir=None):
if not os.path.exists(tempdir):
os.makedirs(tempdir)
if subdir is not None:
- tempdir = tempdir + os.sep + subdir
+ tempdir = os.path.join(tempdir, subdir)
if not os.path.exists(tempdir):
os.makedirs(tempdir)
return tempdir
@@ -108,7 +111,7 @@ def get_download_dirs(asset_type):
subdirs = ['brushes', 'textures', 'models', 'scenes', 'materials']
for subd in subdirs:
- subdir = ddir + os.sep + subd
+ subdir = os.path.join(ddir, subd)
if not os.path.exists(subdir):
os.makedirs(subdir)
if subdmapping[asset_type] == subd:
@@ -123,7 +126,7 @@ def get_download_dirs(asset_type):
subdirs = ['textures', 'models', 'scenes', 'materials'] # brushes get stored only globally.
for subd in subdirs:
- subdir = ddir + os.sep + subd
+ subdir = os.path.join(ddir, subd)
if not os.path.exists(subdir):
os.makedirs(subdir)
if subdmapping[asset_type] == subd: