[vala] Do not delete existing .c files



commit 9664f8ca50502e009816e360a61d9e7fb5c78c6e
Author: Jürg Billeter <j bitron ch>
Date:   Fri Apr 10 12:01:30 2009 +0200

    Do not delete existing .c files
    
    Fixes bug 501585.
---
 vala/valasourcefile.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index da579ad..fbcdbfb 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -203,7 +203,12 @@ public class Vala.SourceFile {
 	 */
 	public string get_csource_filename () {
 		if (csource_filename == null) {
-			csource_filename = "%s%s.c".printf (get_destination_directory (), get_basename ());
+			if (context.ccode_only || context.save_csources) {
+				csource_filename = "%s%s.c".printf (get_destination_directory (), get_basename ());
+			} else {
+				// temporary file
+				csource_filename = "%s%s.vala.c".printf (get_destination_directory (), get_basename ());
+			}
 		}
 		return csource_filename;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]