[moserial] make last commit work with both vala 0.12 and 0.16



commit dbe13051678ed4f3424c41e7ae8e096dbbf8fdad
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Wed Jun 13 12:43:58 2012 -0400

    make last commit work with both vala 0.12 and 0.16

 src/MoUtils.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/MoUtils.vala b/src/MoUtils.vala
index f696159..fcf3b9e 100644
--- a/src/MoUtils.vala
+++ b/src/MoUtils.vala
@@ -39,7 +39,11 @@ public class MoUtils : GLib.Object
 	public static int64 fileSize (string path) {
 		GLib.File file=newFile(path);
 		try {
+#if VALA_0_16
 			GLib.FileInfo info=file.query_info(FileAttribute.STANDARD_SIZE,0,null);
+#else
+			GLib.FileInfo info=file.query_info(GLib.FILE_ATTRIBUTE_STANDARD_SIZE,0,null);
+#endif
 			return info.get_size();
                 } catch (GLib.Error e) {
                         warning("%s", e.message);



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