diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2018-02-22 02:44:10 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2018-02-22 02:44:10 +0300 |
commit | b565a2cd1d34afebcc7ec9ce6e29fee080f8e6c8 (patch) | |
tree | 82d3feb9f005e4c1092d5d23c3228ed56f67bdf9 /WorkerForm.cs | |
parent | ecc89476e66d6dce30b5ec536956a38394bb2ec6 (diff) |
Backward compatibility with old kernels
Diffstat (limited to 'WorkerForm.cs')
-rw-r--r-- | WorkerForm.cs | 12 |
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('|');
|