mirror of
https://github.com/troglobit/libite.git
synced 2026-10-25 11:54:46 +00:00
Fix #11: Allow relative paths to touch()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
123108fbf9
commit
3a26ab28b2
1 file changed
+1
-1
+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