Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 4baf1a3d authored by Rob Swindell's avatar Rob Swindell 💬

Use the new file_size_str() usage for prettier sizes-in-bytes

parent 5e6b0ef8
......@@ -110,7 +110,7 @@ for(var i in dir_list) {
}
log("Searching for duplicates in " + total_files + " files ("
+ file_size_str(total_bytes) + " bytes) ...");
+ file_size_str(total_bytes, /* unit */1, /* precision */1) + " bytes) ...");
var dupe = { name: [], hash: []};
var name_bytes = 0;
var hash_bytes = 0;
......@@ -133,7 +133,7 @@ for(var n in hash) {
}
if(options.names) {
log(dupe.name.length + " duplicate file names (" + file_size_str(name_bytes) + " bytes)");
log(dupe.name.length + " duplicate file names (" + file_size_str(name_bytes,1 , 1) + " bytes)");
if(options.json)
writeln(JSON.stringify(dupe.name, null, 4));
else
......@@ -141,7 +141,7 @@ if(options.names) {
}
if(hash_type) {
log(dupe.hash.length + " duplicate file " + hash_type.toUpperCase() + " sums of at least "
+ min_size + " bytes (" + file_size_str(hash_bytes) + " bytes)");
+ min_size + " bytes (" + file_size_str(hash_bytes, 1, 1) + " bytes)");
if(options.json)
writeln(JSON.stringify(dupe.hash, null, 4));
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment