[chronojump] raceAnalyzer export copies 1st to tmp/*.png to avoid windows accents problems
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] raceAnalyzer export copies 1st to tmp/*.png to avoid windows accents problems
- Date: Wed, 30 Jun 2021 12:23:16 +0000 (UTC)
commit 6393088b805e644ce930341b91b181528302f14a
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jun 30 14:22:51 2021 +0200
raceAnalyzer export copies 1st to tmp/*.png to avoid windows accents problems
src/exportFiles/fs.cs | 2 +-
src/exportFiles/re.cs | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/exportFiles/fs.cs b/src/exportFiles/fs.cs
index 20ee5aec0..0c54aafd3 100644
--- a/src/exportFiles/fs.cs
+++ b/src/exportFiles/fs.cs
@@ -209,7 +209,7 @@ public class ForceSensorExport : ExportFiles
string destination = UtilEncoder.GetmifCSVInputMulti();
Util.FileDelete(destination);
- //copy file to tmp to be written readed by R
+ //copy file to tmp to be readed by R
string fsFullURLMoved = Path.Combine(getTempSourceFilesDir(), count.ToString() +
".csv");
File.Copy(fs.FullURL, fsFullURLMoved, true); //can be overwritten
diff --git a/src/exportFiles/re.cs b/src/exportFiles/re.cs
index 74581d975..a7fea8e0d 100644
--- a/src/exportFiles/re.cs
+++ b/src/exportFiles/re.cs
@@ -82,6 +82,7 @@ public class RunEncoderExport : ExportFiles
protected override void createOrEmptyDirs()
{
+ createOrEmptyDir(getTempSourceFilesDir());
createOrEmptyDir(getTempProgressDir());
createOrEmptyDir(getTempGraphsDir());
createOrEmptyDir(getTempExportInstantDir());
@@ -117,7 +118,7 @@ public class RunEncoderExport : ExportFiles
List<RunEncoderGraphExport> rege_l = new List<RunEncoderGraphExport>();
- //int count = 1;
+ int count = 1;
int element = -1; //used to sync re_l[element] with triggerListOfLists[element]
foreach(RunEncoder re in re_l)
{
@@ -170,9 +171,13 @@ public class RunEncoderExport : ExportFiles
string title = Util.ChangeSpaceAndMinusForUnderscore(p.Name) + "-" +
Util.ChangeSpaceAndMinusForUnderscore(reEx.Name);
+ // 5) copy file to tmp to be readed by R
+ string reFullURLMoved = Path.Combine(getTempSourceFilesDir(), (count ++).ToString() +
".csv");
+ File.Copy(re.FullURL, reFullURLMoved, true); //can be overwritten
+
RunEncoderGraphExport rege = new RunEncoderGraphExport (
isWindows,
- re.FullURL,
+ reFullURLMoved,
ps.Weight, ps.Height,
re.Device,
re.Temperature, re.Distance,
@@ -181,7 +186,6 @@ public class RunEncoderExport : ExportFiles
re.Comments
);
rege_l.Add(rege);
-
}
Util.FileDelete(RunEncoder.GetCSVResultsURL());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]