Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'WorkerForm.cs')
-rw-r--r--WorkerForm.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/WorkerForm.cs b/WorkerForm.cs
index 7c796037..c12a7282 100644
--- a/WorkerForm.cs
+++ b/WorkerForm.cs
@@ -798,7 +798,17 @@ namespace com.clusterrr.hakchi_gui
const string rootFsPath = "/var/lib/hakchi/rootfs";
var clovershell = MainForm.Clovershell;
- if (gameSyncStorage == null) gameSyncStorage = clovershell.ExecuteSimple($"hakchi findGameSyncStorage", 3000, true);
+ if (gameSyncStorage == null)
+ {
+ try
+ {
+ gameSyncStorage = clovershell.ExecuteSimple($"hakchi findGameSyncStorage", 3000, true);
+ }
+ catch
+ {
+ gameSyncStorage = rootFsPath + originalGamesPath;
+ }
+ }
var storageDevice = clovershell.ExecuteSimple($"df {gameSyncStorage} | sed -n '2p' | awk '{{print $1}}'", 3000, true);
var storageStats = clovershell.ExecuteSimple($"df {storageDevice} | tail -n 1 | awk '{{ print $2 \" | \" $3 \" | \" $4 }}'", 3000, true).Split('|');