[chronojump] Fixed: DeleteAllStuff deletes forceSensor and runEncoder since last commits
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed: DeleteAllStuff deletes forceSensor and runEncoder since last commits
- Date: Tue, 30 Jun 2020 05:58:08 +0000 (UTC)
commit 65156a578f7f08f24695c75836a8768613797063
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jun 30 07:57:32 2020 +0200
Fixed: DeleteAllStuff deletes forceSensor and runEncoder since last commits
src/sqlite/session.cs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index 6cb68d96..cf4b0d4d 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -1047,8 +1047,9 @@ class SqliteSession : Sqlite
folderSession = new System.IO.DirectoryInfo(
Util.GetForceSensorSessionDir(Convert.ToInt32(sessionID)));
- foreach (FileInfo file in folderSession.GetFiles())
- Util.FileDelete(file.Name);
+ if(folderSession.Exists)
+ foreach (FileInfo file in folderSession.GetFiles())
+ Util.FileDelete(file.Name);
}
// delete runEncoder
@@ -1061,8 +1062,9 @@ class SqliteSession : Sqlite
folderSession = new System.IO.DirectoryInfo(
Util.GetRunEncoderSessionDir(Convert.ToInt32(sessionID)));
- foreach (FileInfo file in folderSession.GetFiles())
- Util.FileDelete(file.Name);
+ if(folderSession.Exists)
+ foreach (FileInfo file in folderSession.GetFiles())
+ Util.FileDelete(file.Name);
}
//TODO: delete multimedia stuff of persons that have to be deleted, eg. on export: persons
that are not in session (just for privacity)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]