Added
Link Here
|
1 |
--- ../../zen/file_access.cpp.orig 2016-01-11 12:13:10 UTC |
2 |
+++ ../../zen/file_access.cpp |
3 |
@@ -877,6 +877,11 @@ void setFileTimeRaw(const Zstring& fileP |
4 |
//https://sourceforge.net/p/freefilesync/discussion/open-discussion/thread/218564cf/ |
5 |
newTimes[1] = modTime; //modification time |
6 |
|
7 |
+#if defined(__FreeBSD__) |
8 |
+#include <osreldate.h> |
9 |
+#if __FreeBSD_version < 1002506 || (__FreeBSD_version >= 1100000 && __FreeBSD_version < 1100056) |
10 |
+ throw ErrorLinuxFallbackToUtimes(L""); |
11 |
+#else |
12 |
//=> using open()/futimens() for regular files and utimensat(AT_SYMLINK_NOFOLLOW) for symlinks is consistent with "cp" and "touch"! |
13 |
if (procSl == ProcSymlink::FOLLOW) |
14 |
{ |
15 |
@@ -898,6 +903,8 @@ void setFileTimeRaw(const Zstring& fileP |
16 |
if (::utimensat(AT_FDCWD, filePath.c_str(), newTimes, AT_SYMLINK_NOFOLLOW) != 0) |
17 |
THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtPath(filePath)), L"utimensat"); |
18 |
} |
19 |
+#endif |
20 |
+#endif |
21 |
} |
22 |
|
23 |
|