[chronojump] fix R issue in Windows
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [chronojump] fix R issue in Windows
- Date: Fri, 4 Sep 2009 23:15:34 +0000 (UTC)
commit 049e7a64249152ef98b9cac5b4cf72e89213e146
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Sep 5 01:09:05 2009 +0200
fix R issue in Windows
Replace every '\' with '/' in a file path, because R
uses '/' even in win32 for a file path
src/stats/main.cs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/stats/main.cs b/src/stats/main.cs
index 7ab052c..fb22ff4 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -1180,7 +1180,10 @@ public class Stat
//there will be always a png with chronojump_logo
fileName = directoryName+"/"+pngs.Length.ToString() + ".png";
} else
- fileName = Path.GetTempPath()+"/"+fileName;
+ fileName = Path.GetTempPath()+"/"+fileName;
+ //On win32 R understands backlash as an escape character and
+ //a file path uses Unix-like path separator '/'
+ fileName = fileName.Replace("\\","/");
string rString = "png(filename = '" + fileName + "'\n" +
" , width = " + gRO.Width + ", height = " + gRO.Height + ", units = 'px'\n" +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]