forked from platformio/platformio-core
Move "to_unix_path" helper to FS module
This commit is contained in:
1 parent
98ec287797
commit
8037bef847
2 files changed
+11
-12
No files matched your search
+7
-1
@@ -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, __):
|
||||
|
||||
Reference in new issue
Block a user