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);