Move "to_unix_path" helper to FS module

This commit is contained in:
Ivan Kravets committed 2019-08-27 20:21:53 +03:00
1 parent 98ec287797
commit 8037bef847
2 files changed
+11 -12

No files matched your search

+7 -1
View File
@@ -23,7 +23,7 @@ from glob import glob
import click
from platformio import exception
from platformio.compat import get_file_contents, glob_escape
from platformio.compat import WINDOWS, get_file_contents, glob_escape
class cd(object):
@@ -146,6 +146,12 @@ def match_src_files(src_dir, src_filter=None, src_exts=None):
return sorted(list(matches))
def to_unix_path(path):
if not WINDOWS or not path:
return path
return re.sub(r"[\\]+", "/", path)
def rmtree(path):
def _onerror(func, path, __):