mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
fixing handling of relative paths
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
import json
|
import json
|
||||||
from os import name as os_name
|
from os import name as os_name
|
||||||
from os import getcwd, getenv, listdir, makedirs, utime
|
from os import getcwd, getenv, listdir, makedirs, utime
|
||||||
from os.path import dirname, expanduser, isdir, isfile, join, realpath
|
from os.path import dirname, expanduser, isdir, isfile, join, realpath, abspath
|
||||||
from platform import system, uname
|
from platform import system, uname
|
||||||
from subprocess import PIPE, Popen
|
from subprocess import PIPE, Popen
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ def get_lib_dir():
|
|||||||
config = get_project_config()
|
config = get_project_config()
|
||||||
if (config.has_section("platformio") and
|
if (config.has_section("platformio") and
|
||||||
config.has_option("platformio", "lib_dir")):
|
config.has_option("platformio", "lib_dir")):
|
||||||
lib_dir = config.get("platformio", "lib_dir")
|
lib_dir = abspath(config.get("platformio", "lib_dir"))
|
||||||
if lib_dir.startswith("~"):
|
if lib_dir.startswith("~"):
|
||||||
return expanduser(lib_dir)
|
return expanduser(lib_dir)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user