commit 69f10cd9b6ce9a824cf56f120d870e5d88e8b9d5
parent baa7ac8edc460c441411a5368c87d56339c28787
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sun, 12 Jun 2016 11:14:00 -0600
src: add comment that's been in my tree for a while
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/inst_main.cc b/src/inst_main.cc
@@ -115,6 +115,7 @@ copy_file(std::string dst_fn, std::string src_fn)
struct stat sb;
struct timeval st_tim[2];
+ // Save original access and modification times
stat(src_fn.c_str(), &sb);
#ifdef __APPLE__
TIMESPEC_TO_TIMEVAL(&st_tim[0], &sb.st_atimespec);
@@ -132,6 +133,7 @@ copy_file(std::string dst_fn, std::string src_fn)
src.close();
dst.close();
+ // Restore the original access and modification time
utimes(dst_fn.c_str(), st_tim);
}