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

Use human readable size units when reporting transferred files.

Refers to #24
parent c6c0349e
No related branches found
No related tags found
No related merge requests found
...@@ -120,7 +120,8 @@ namespace ATxService ...@@ -120,7 +120,8 @@ namespace ATxService
// WARNING: RoboSharp doesn't seem to offer a culture invariant representation // WARNING: RoboSharp doesn't seem to offer a culture invariant representation
// of the FileClass, so this might fail in non-english environments: // of the FileClass, so this might fail in non-english environments:
if (processed.FileClass.ToLower().Equals("new file")) { if (processed.FileClass.ToLower().Equals("new file")) {
_transferredFiles.Add(processed.Name + " (" + (processed.Size / 1048576) + " MB)"); _transferredFiles.Add(string.Format("{0} ({1})", processed.Name,
Conv.BytesToString(processed.Size)));
} }
} }
catch (Exception ex) { catch (Exception ex) {
......
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