fixing handling of relative paths

This commit is contained in:
Arne Augenstein
2015-01-24 08:53:34 +01:00
parent 2820e5a243
commit f84b113b5e

View File

@ -4,7 +4,7 @@
import json
from os import name as os_name
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 subprocess import PIPE, Popen
@ -51,7 +51,7 @@ def get_lib_dir():
config = get_project_config()
if (config.has_section("platformio") and
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("~"):
return expanduser(lib_dir)
else: