mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
symlinkify: file -> symlink-to-original-file after timeout
This commit is contained in:
parent
25ce9938c6
commit
6a7675f2bf
13 changed files with 290 additions and 47 deletions
18
src/num.cpp
18
src/num.cpp
|
|
@ -57,4 +57,22 @@ namespace num
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
to_time_t(const std::string &str,
|
||||
time_t &value)
|
||||
{
|
||||
time_t tmp;
|
||||
char *endptr;
|
||||
|
||||
tmp = strtoll(str.c_str(),&endptr,10);
|
||||
if(*endptr != '\0')
|
||||
return -1;
|
||||
if(tmp < 0)
|
||||
return -1;
|
||||
|
||||
value = tmp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue