mirror of
https://github.com/troglobit/libite.git
synced 2026-10-01 05:22:34 +07:00
Fix #11: Allow relative paths to touch()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ static inline int touch(const char *path)
|
||||
{
|
||||
if (mknod((path), S_IFREG|0644, 0)) {
|
||||
if (errno == EEXIST)
|
||||
return utimensat(0, path, NULL, 0);
|
||||
return utimensat(AT_FDCWD, path, NULL, 0);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user