From 0b44fc28e172625849e05b2ca15fbaa27a2e280e Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 18 Sep 2013 19:14:14 +0000 Subject: [PATCH] ide: Fix of main.conf.h build process git-svn-id: svn://ultimatepp.org/upp/trunk@6368 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Builders/Build.cpp | 7 ++++--- uppsrc/ide/Core/Core.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/uppsrc/ide/Builders/Build.cpp b/uppsrc/ide/Builders/Build.cpp index f2e4a20d5..19a157542 100644 --- a/uppsrc/ide/Builders/Build.cpp +++ b/uppsrc/ide/Builders/Build.cpp @@ -393,9 +393,10 @@ bool MakeBuild::Build(const Workspace& wspc, String mainparam, String outfile, b One b = CreateBuilder(~host); if(b) { Index mcfg = PackageConfig(wspc, 0, bm, mainparam, *host, *b, NULL); - String outdir = OutDir(mcfg, wspc[0], bm, use_target); - SaveFile(AppendFileName(outdir, "main.conf.h"), - main_conf); + String outdir = OutDir(mcfg, wspc[0], bm, false); + String path = AppendFileName(outdir, "main.conf.h"); + RealizePath(path); + SaveChangedFile(path, main_conf); add_includes << outdir << ';'; } } diff --git a/uppsrc/ide/Core/Core.cpp b/uppsrc/ide/Core/Core.cpp index a24d5b6a9..2e9096722 100644 --- a/uppsrc/ide/Core/Core.cpp +++ b/uppsrc/ide/Core/Core.cpp @@ -271,7 +271,7 @@ String IdeGetLine(int i) bool SaveChangedFile(const char *path, String data, bool delete_empty) { - if(LoadFile(path) == data) + if(LoadFile(path) == data && (FileExists(path) || delete_empty)) return true; if(delete_empty && IsNull(data)) return FileDelete(path);