[DEBUG] Correct creating directory of file when needed

This commit is contained in:
Edouard DUPIN 2015-10-20 23:33:53 +02:00
parent 62ac51e78b
commit c913e19ccf
2 changed files with 1 additions and 1 deletions

View File

@ -91,6 +91,7 @@ def file_write_data(path, data, only_if_new=False):
if old_data == data: if old_data == data:
return return
#real write of data: #real write of data:
create_directory_of_file(path)
file = open(path, "w") file = open(path, "w")
file.write(data) file.write(data)
file.close() file.close()

View File

@ -110,7 +110,6 @@ class Target(target.Target):
data_file = "#!/bin/bash\n" data_file = "#!/bin/bash\n"
data_file += "# Simply open the real application in the correct way (a link does not work ...)\n" data_file += "# Simply open the real application in the correct way (a link does not work ...)\n"
data_file += "/Applications/" + pkg_name + ".app/Contents/MacOS/" + pkg_name + " $*\n" data_file += "/Applications/" + pkg_name + ".app/Contents/MacOS/" + pkg_name + " $*\n"
#tmpFile.write("open -n /Applications/edn.app --args -AppCommandLineArg $*\n")
tools.file_write_data(os.path.join(target_outpath, "shell", pkg_name), tools.file_write_data(os.path.join(target_outpath, "shell", pkg_name),
data_file, data_file,
only_if_new=True) only_if_new=True)