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
path: root/Apps
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-02-14 18:39:02 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-02-14 18:39:02 +0300
commita264f7a8df6570c08384aa30f33164c83308ed4d (patch)
tree16c18c2957714b38f5e5b02377467dc4aa98bd6d /Apps
parent770366b786ff798bb21530bb913897219ec0e600 (diff)
rsync progress calculation
Diffstat (limited to 'Apps')
-rw-r--r--Apps/NesMiniApplication.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Apps/NesMiniApplication.cs b/Apps/NesMiniApplication.cs
index 3b6a7ad5..10d1c2d1 100644
--- a/Apps/NesMiniApplication.cs
+++ b/Apps/NesMiniApplication.cs
@@ -631,10 +631,13 @@ namespace com.clusterrr.hakchi_gui
return size;
}
- public long Size(string path = null)
+ public long Size()
+ {
+ return DirectorySize(GamePath);
+ }
+
+ public static long DirectorySize(string path)
{
- if (path == null)
- path = GamePath;
long size = 0;
// Get the subdirectories for the specified directory.
DirectoryInfo dir = new DirectoryInfo(path);
@@ -650,7 +653,7 @@ namespace com.clusterrr.hakchi_gui
}
foreach (DirectoryInfo subdir in dirs)
{
- size += Size(subdir.FullName);
+ size += DirectorySize(subdir.FullName);
}
return size;
}