[vala] Use '/' as directory separator instead of using build_filename
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Use '/' as directory separator instead of using build_filename
- Date: Fri, 2 Sep 2011 07:08:46 +0000 (UTC)
commit 7f7a991aa7689137e166d1eca4db036ccd0cd564
Author: Luca Bruno <lucabru src gnome org>
Date: Sat Aug 27 16:56:36 2011 +0200
Use '/' as directory separator instead of using build_filename
Fixes bug 657501.
vala/valacodecontext.vala | 12 ++++++------
vapigen/valavapigen.vala | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index dde3253..c66af64 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -345,7 +345,7 @@ public class Vala.CodeContext {
stdout.printf ("Loaded package `%s'\n", path);
}
- var deps_filename = Path.build_filename (Path.get_dirname (path), "%s.deps".printf (pkg));
+ var deps_filename = "%s/%s.deps".printf (Path.get_dirname (path), pkg);
if (!add_packages_from_file (deps_filename)) {
return false;
}
@@ -484,7 +484,7 @@ public class Vala.CodeContext {
if (path == null) {
/* last chance: try the package compiled-in vapi dir */
- var filename = Path.build_filename (Config.PACKAGE_DATADIR, "vapi", pkg + ".vapi");
+ var filename = "%s/vapi/%s.vapi".printf (Config.PACKAGE_DATADIR, pkg);
if (FileUtils.test (filename, FileTest.EXISTS)) {
path = filename;
}
@@ -511,7 +511,7 @@ public class Vala.CodeContext {
}
// look into the same directory of .gir
- metadata_filename = Path.build_filename (Path.get_dirname (gir_filename), metadata_basename);
+ metadata_filename = "%s/%s".printf (Path.get_dirname (gir_filename), metadata_basename);
if (FileUtils.test (metadata_filename, FileTest.EXISTS)) {
return metadata_filename;
}
@@ -524,7 +524,7 @@ public class Vala.CodeContext {
if (directories != null) {
foreach (string dir in directories) {
- filename = Path.build_filename (dir, basename);
+ filename = "%s/%s".printf (dir, basename);
if (FileUtils.test (filename, FileTest.EXISTS)) {
return filename;
}
@@ -533,7 +533,7 @@ public class Vala.CodeContext {
if (versioned_data_dir != null) {
foreach (string dir in Environment.get_system_data_dirs ()) {
- filename = Path.build_filename (dir, versioned_data_dir, basename);
+ filename = "%s/%s/%s".printf (dir, versioned_data_dir, basename);
if (FileUtils.test (filename, FileTest.EXISTS)) {
return filename;
}
@@ -542,7 +542,7 @@ public class Vala.CodeContext {
if (data_dir != null) {
foreach (string dir in Environment.get_system_data_dirs ()) {
- filename = Path.build_filename (dir, data_dir, basename);
+ filename = "%s/%s/%s".printf (dir, data_dir, basename);
if (FileUtils.test (filename, FileTest.EXISTS)) {
return filename;
}
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index 3247aa3..2129391 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -186,7 +186,7 @@ class Vala.VAPIGen : Object {
var interface_writer = new CodeWriter ();
var vapi_filename = "%s.vapi".printf (library);
if (directory != null) {
- vapi_filename = Path.build_filename (directory, vapi_filename);
+ vapi_filename = "%s/%s".printf (directory, vapi_filename);
}
interface_writer.write_file (context, vapi_filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]