mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix calls to utimensat() which were passing the wrong value for the first argument, which needs to be the file descriptor of the directory containing the file, or AT_FDCWD to use the current directory.
This commit is contained in:
parent
62c68d3cab
commit
1f2b03e84d
1 changed files with 2 additions and 2 deletions
|
@ -613,7 +613,7 @@ static NSStringEncoding defaultEncoding;
|
|||
ub[1].tv_sec = truncl(ti);
|
||||
ub[1].tv_nsec = (ti - (double)ub[1].tv_sec) * 1.0e6;
|
||||
|
||||
ok = (utimensat(0, lpath, ub, 0) == 0);
|
||||
ok = (utimensat(AT_FDCWD, lpath, ub, 0) == 0);
|
||||
#elif defined(_POSIX_VERSION)
|
||||
struct _UTIMB ub;
|
||||
ub.actime = sb.st_atime;
|
||||
|
@ -662,7 +662,7 @@ static NSStringEncoding defaultEncoding;
|
|||
ub[1].tv_sec = truncl(ti);
|
||||
ub[1].tv_nsec = (ti - (double)ub[1].tv_sec) * 1.0e6;
|
||||
|
||||
ok = (utimensat(0, lpath, ub, 0) == 0);
|
||||
ok = (utimensat(AT_FDCWD, lpath, ub, 0) == 0);
|
||||
#elif defined(_WIN32) || defined(_POSIX_VERSION)
|
||||
struct _UTIMB ub;
|
||||
ub.actime = sb.st_atime;
|
||||
|
|
Loading…
Reference in a new issue