changeset 6114:a0dafb51dd06

[project @ 2006-10-27 14:02:16 by jwe]
author jwe
date Fri, 27 Oct 2006 14:02:16 +0000
parents 2dc8e7f1ee1e
children bade9ff1814b
files src/ChangeLog src/defaults.cc
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Oct 27 13:23:22 2006 +0000
+++ b/src/ChangeLog	Fri Oct 27 14:02:16 2006 +0000
@@ -1,3 +1,9 @@
+2006-10-27  John W. Eaton  <jwe@octave.org>
+
+	* defaults.cc (subst_octave_home): If dir_sep_char is not '/',
+	replace before returning.
+	From Michael Goffioul <michael.goffioul@swing.be>.
+
 2006-10-26  John W. Eaton  <jwe@octave.org>
 
 	* cutils.c (octave_strcasecmp, octave-strncasecmp):
--- a/src/defaults.cc	Fri Oct 27 13:23:22 2006 +0000
+++ b/src/defaults.cc	Fri Oct 27 14:02:16 2006 +0000
@@ -27,6 +27,7 @@
 
 #include <cstdlib>
 
+#include <algorithm>
 #include <iostream>
 #include <string>
 
@@ -118,6 +119,9 @@
 	}
     }
 
+  if (file_ops::dir_sep_char != '/')
+    std::replace (retval.begin (), retval.end (), '/', file_ops::dir_sep_char);
+
   return retval;
 }