Better support for file contents writing // Issue #2796

This commit is contained in:
Ivan Kravets committed 2019-10-17 18:48:59 +03:00
1 parent 7bcfea13fb
commit 6218b773fd
14 files changed
+80 -91

No files matched your search

+3 -6
View File
@@ -53,12 +53,9 @@ def clean_build_dir(build_dir, config):
if isdir(build_dir):
# check project structure
if isfile(checksum_file):
with open(checksum_file) as f:
if f.read() == checksum:
return
if isfile(checksum_file) and fs.get_file_contents(checksum_file) == checksum:
return
fs.rmtree(build_dir)
makedirs(build_dir)
with open(checksum_file, "w") as f:
f.write(checksum)
fs.write_file_contents(checksum_file, checksum)