From 162f7785f05e9eb200cec22ba0d27a19ea110589 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 20 Mar 2017 21:45:37 +0100 Subject: [PATCH] [DEBUG] copy empty file --- lutin/tools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lutin/tools.py b/lutin/tools.py index 0acd921..dc194cf 100644 --- a/lutin/tools.py +++ b/lutin/tools.py @@ -92,9 +92,10 @@ def version_to_string(version): ## def file_write_data(path, data, only_if_new=False): if only_if_new == True: - old_data = file_read_data(path) - if old_data == data: - return False + if os.path.exists(path) == True: + old_data = file_read_data(path) + if old_data == data: + return False #real write of data: create_directory_of_file(path) file = open(path, "w")