forked from platformio/platformio-core
Use native open/io.open for file contents reading/writing
This commit is contained in:
@@ -53,9 +53,12 @@ def clean_build_dir(build_dir, config):
|
||||
|
||||
if isdir(build_dir):
|
||||
# check project structure
|
||||
if isfile(checksum_file) and fs.get_file_contents(checksum_file) == checksum:
|
||||
return
|
||||
if isfile(checksum_file):
|
||||
with open(checksum_file) as fp:
|
||||
if fp.read() == checksum:
|
||||
return
|
||||
fs.rmtree(build_dir)
|
||||
|
||||
makedirs(build_dir)
|
||||
fs.write_file_contents(checksum_file, checksum)
|
||||
with open(checksum_file, "w") as fp:
|
||||
fp.write(checksum)
|
||||
|
||||
Reference in New Issue
Block a user