[chronojump] Fixed forceSensor export files with images on certain systems
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed forceSensor export files with images on certain systems
- Date: Thu, 3 Jun 2021 15:20:11 +0000 (UTC)
commit bbd1eb54929bf80e3d88dc880dfec72d78c7a520
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jun 3 17:19:29 2021 +0200
Fixed forceSensor export files with images on certain systems
src/exportFiles/fs.cs | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/exportFiles/fs.cs b/src/exportFiles/fs.cs
index 0ed3caf08..8b0632524 100644
--- a/src/exportFiles/fs.cs
+++ b/src/exportFiles/fs.cs
@@ -83,8 +83,11 @@ public class ForceSensorExport : ExportFiles
private string getTempGraphsABDir() {
return Path.Combine(Path.GetTempPath(), "chronojump_force_sensor_export_graphs_ab");
}
+ private string getCSVFileName() {
+ return "chronojump_force_sensor_export.csv";
+ }
private string getTempCSVFileName() {
- return Path.Combine(Path.GetTempPath(), "chronojump_force_sensor_export.csv");
+ return Path.Combine(Path.GetTempPath(), getCSVFileName());
}
protected override void createOrEmptyDirs()
@@ -358,7 +361,11 @@ public class ForceSensorExport : ExportFiles
return false;
//copy the CSV
- File.Copy(getTempCSVFileName(), exportURL, true);
+ //if includeImages, exportURL is a dir, so need a filename to have File.Copy on all systems
+ if(includeImages)
+ File.Copy(getTempCSVFileName(), Path.Combine(exportURL, getCSVFileName()), true);
+ else
+ File.Copy(getTempCSVFileName(), exportURL, true);
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]