mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Improve support for non-Unicode user profiles for Windows OS
This commit is contained in:
@ -15,6 +15,7 @@ PlatformIO 2.0
|
|||||||
* Updated "Teensy Loader CLI" and fixed uploading of large .hex files
|
* Updated "Teensy Loader CLI" and fixed uploading of large .hex files
|
||||||
(`issue #568 <https://github.com/platformio/platformio/issues/568>`_)
|
(`issue #568 <https://github.com/platformio/platformio/issues/568>`_)
|
||||||
* Better handling of used boards when re-initialize/update project
|
* Better handling of used boards when re-initialize/update project
|
||||||
|
* Improved support for non-Unicode user profiles for Windows OS
|
||||||
* Disabled progress bar for download operations when prompts are disabled
|
* Disabled progress bar for download operations when prompts are disabled
|
||||||
* Fixed multiple definition errors for ST STM32 development platform and mbed
|
* Fixed multiple definition errors for ST STM32 development platform and mbed
|
||||||
framework
|
framework
|
||||||
|
@ -20,8 +20,10 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from os.path import abspath, basename, dirname, expanduser, isdir, isfile, join
|
from os.path import (abspath, basename, dirname, expanduser, isdir, isfile,
|
||||||
|
join, splitdrive)
|
||||||
from platform import system, uname
|
from platform import system, uname
|
||||||
|
from tempfile import TemporaryFile
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
from platformio import __apiip__, __apiurl__, __version__, exception
|
from platformio import __apiip__, __apiurl__, __version__, exception
|
||||||
@ -161,7 +163,15 @@ def get_home_dir():
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not isdir(home_dir):
|
if not isdir(home_dir):
|
||||||
os.makedirs(home_dir)
|
try:
|
||||||
|
os.makedirs(home_dir)
|
||||||
|
f = TemporaryFile(dir=home_dir)
|
||||||
|
f.close()
|
||||||
|
except (OSError, WindowsError):
|
||||||
|
if "windows" in get_systype():
|
||||||
|
home_dir = splitdrive(home_dir)[0] + "\.platformio"
|
||||||
|
if not isdir(home_dir):
|
||||||
|
os.makedirs(home_dir)
|
||||||
|
|
||||||
assert isdir(home_dir)
|
assert isdir(home_dir)
|
||||||
return home_dir
|
return home_dir
|
||||||
|
Reference in New Issue
Block a user