From a3c6a00ccc8664aeda0610c17a26f11838dcc358 Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Wed, 15 Aug 2007 22:28:20 +0000
Subject: [PATCH] Small fixes to have the message generation stuff work on Windows

---
 opends/src/build-tools/org/opends/build/tools/GenerateMessageFile.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/opends/src/build-tools/org/opends/build/tools/GenerateMessageFile.java b/opends/src/build-tools/org/opends/build/tools/GenerateMessageFile.java
index 54b6e4f..3d02147 100644
--- a/opends/src/build-tools/org/opends/build/tools/GenerateMessageFile.java
+++ b/opends/src/build-tools/org/opends/build/tools/GenerateMessageFile.java
@@ -645,7 +645,7 @@
   }
 
   private String getBase() {
-    String srcPath = source.getAbsolutePath();
+    String srcPath = unixifyPath(source.getAbsolutePath());
     String base = srcPath.substring(srcPath.lastIndexOf("messages/"));
     if (base.endsWith(".properties")) {
       base = base.substring(0, base.length() - ".properties".length());
@@ -654,7 +654,7 @@
   }
 
   private String getPackage() {
-    String destPath = dest.getAbsolutePath();
+    String destPath = unixifyPath(dest.getAbsolutePath());
     String c = destPath.substring(destPath.indexOf("org/opends"));
     c = c.replace('/', '.');
     c = c.substring(0, c.lastIndexOf(".")); // strip .java
@@ -739,6 +739,10 @@
     return registry;
   }
 
+  private static String unixifyPath(String path) {
+    return path.replace("\\", "/");
+  }
+
 
   /**
    * For testing.

--
Gitblit v1.10.0