195 |
with e -> |
with e -> |
196 |
lprintf_nl "[cInt] Exception in file_cancel: %s" (Printexc2.to_string e) |
lprintf_nl "[cInt] Exception in file_cancel: %s" (Printexc2.to_string e) |
197 |
|
|
|
let time_to_string time = |
|
|
let days = time / 60 / 60 / 24 in |
|
|
let rest = time - days * 60 * 60 * 24 in |
|
|
let hours = rest / 60 / 60 in |
|
|
let rest = rest - hours * 60 * 60 in |
|
|
let minutes = rest / 60 in |
|
|
let seconds = rest - minutes * 60 in |
|
|
if days > 0 |
|
|
then Printf.sprintf " %dd " days |
|
|
else if hours > 0 |
|
|
then Printf.sprintf " %dh %dm " hours minutes |
|
|
else Printf.sprintf " %dm " minutes |
|
|
|
|
198 |
let mail_for_completed_file file = |
let mail_for_completed_file file = |
199 |
if !!mail <> "" then |
if !!mail <> "" then |
200 |
let module M = Mailer in |
let module M = Mailer in |
205 |
(file_best_name file) |
(file_best_name file) |
206 |
(file_size file) |
(file_size file) |
207 |
(string_of_uids info.G.file_uids) |
(string_of_uids info.G.file_uids) |
208 |
(let age = (BasicSocket.last_time ()) - info.G.file_age in time_to_string age) |
(let age = (BasicSocket.last_time ()) - info.G.file_age in Date.time_to_string_long age) |
209 |
in |
in |
210 |
|
|
211 |
let line3 = if (file_comment file) <> "" then |
let line3 = if (file_comment file) <> "" then |