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:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-06 06:00:30 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-06 06:00:30 +0300
commit1c9388f8e7f7f5200e8a73d0690977337ee3bcce (patch)
tree889559bab2818414f7bddd7a680445cc943cebfa /WorkerForm.cs
parenta45674adbbe6c83989c31b2d9192d729ce2c0ad2 (diff)
Tiny fix
Diffstat (limited to 'WorkerForm.cs')
-rw-r--r--WorkerForm.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/WorkerForm.cs b/WorkerForm.cs
index 045a1462..ef08c9d5 100644
--- a/WorkerForm.cs
+++ b/WorkerForm.cs
@@ -570,7 +570,8 @@ namespace com.clusterrr.hakchi_gui
SetStatus(Resources.ExecutingCommand + " " + shutdownCommand);
fel.RunUbootCmd(shutdownCommand, true);
#if !DEBUG
- Directory.Delete(tempDirectory, true);
+ if (Directory.Exists(tempDirectory))
+ Directory.Delete(tempDirectory, true);
#endif
SetStatus(Resources.Done);
SetProgress(maxProgress, maxProgress);
@@ -840,7 +841,7 @@ namespace com.clusterrr.hakchi_gui
case MainForm.ConsoleType.SNES:
case MainForm.ConsoleType.SuperFamicom:
originalSyncCode = $"mkdir -p \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/\" && " +
- $"rsync -ac \"{gamesPath}/{originalCode}/\" \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/\" &&"+
+ $"rsync -ac \"{gamesPath}/{originalCode}/\" \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/\" &&" +
$"sed -i -e 's/\\/usr\\/bin\\/clover-canoe-shvc/\\/bin\\/clover-canoe-shvc-wr/g' \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/{originalCode}.desktop\"";
/*
// With compression but very slow
@@ -860,7 +861,8 @@ namespace com.clusterrr.hakchi_gui
SetStatus(Resources.UploadingConfig);
SyncConfig(Config);
#if !DEBUG
- Directory.Delete(tempDirectory, true);
+ if (Directory.Exists(tempDirectory))
+ Directory.Delete(tempDirectory, true);
#endif
SetStatus(Resources.Done);
SetProgress(maxProgress, maxProgress);
@@ -993,6 +995,7 @@ namespace com.clusterrr.hakchi_gui
fel.RunUbootCmd(bootCommand, true);
Thread.Sleep(7000);
#if !DEBUG
+ if (Directory.Exists(tempDirectory))
Directory.Delete(tempDirectory, true);
#endif
SetStatus(Resources.Done);
@@ -1023,7 +1026,8 @@ namespace com.clusterrr.hakchi_gui
SetStatus(Resources.BuildingCustom);
if (!File.Exists(Path.Combine(ramfsDirectory, "init")))
UnpackRamfs(kernelPath);
- if (Directory.Exists(hakchiDirectory)) Directory.Delete(hakchiDirectory, true);
+ if (Directory.Exists(hakchiDirectory))
+ Directory.Delete(hakchiDirectory, true);
NesMiniApplication.DirectoryCopy(Path.Combine(modsDirectory, Mod), ramfsDirectory, true);
var ramfsFiles = Directory.GetFiles(ramfsDirectory, "*.*", SearchOption.AllDirectories);
foreach (var file in ramfsFiles)
@@ -1085,7 +1089,8 @@ namespace com.clusterrr.hakchi_gui
var result = File.ReadAllBytes(kernelPatched);
#if !DEBUG
- Directory.Delete(tempDirectory, true);
+ if (Directory.Exists(tempDirectory))
+ Directory.Delete(tempDirectory, true);
#endif
return result;
}