Skip to content
Snippets Groups Projects
Commit 76cb10f3 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Introduce global shortcuts for x-bytes factors.

parent 3d2aa0f6
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,9 @@ namespace AutoTx
private int _txProgress;
private const int MegaBytes = 1024 * 1024;
private const int GigaBytes = 1024 * 1024 * 1024;
private DateTime _lastUserDirCheck = DateTime.Now;
// the transfer state:
......
......@@ -61,7 +61,7 @@ namespace AutoTx
private long GetFreeDriveSpace(string drive) {
try {
var dInfo = new DriveInfo(drive);
return dInfo.TotalFreeSpace / 1048576; // convert bytes to MB
return dInfo.TotalFreeSpace / MegaBytes;
}
catch (Exception ex) {
writeLog("Error in GetFreeDriveSpace(" + drive + "): " + ex.Message);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment