[vala] Give priority to unversioned vapi directory



commit 07d3bbf32e546b432eee11bd802999594fa733ef
Author: Evan Nemerson <evan coeus-group com>
Date:   Fri Jun 22 12:04:40 2012 -0700

    Give priority to unversioned vapi directory
    
    This allows bindings distributed with upstream libraries to be
    prioritized over bindings distributed with Vala.

 vala/valacodecontext.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index faa431b..f2b8b59 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -537,18 +537,18 @@ public class Vala.CodeContext {
 			}
 		}
 
-		if (versioned_data_dir != null) {
+		if (data_dir != null) {
 			foreach (string dir in Environment.get_system_data_dirs ()) {
-				filename = Path.build_path ("/", dir, versioned_data_dir, basename);
+				filename = Path.build_path ("/", dir, data_dir, basename);
 				if (FileUtils.test (filename, FileTest.EXISTS)) {
 					return filename;
 				}
 			}
 		}
 
-		if (data_dir != null) {
+		if (versioned_data_dir != null) {
 			foreach (string dir in Environment.get_system_data_dirs ()) {
-				filename = Path.build_path ("/", dir, data_dir, basename);
+				filename = Path.build_path ("/", dir, versioned_data_dir, basename);
 				if (FileUtils.test (filename, FileTest.EXISTS)) {
 					return filename;
 				}



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