mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +02:00
Path/Directory
- Uses proper macros for st_mode inspection (thanks to Wim Schuermann).
This commit is contained in:
parent
550d592abe
commit
e7af475a2e
2 changed files with 6 additions and 6 deletions
|
@ -161,7 +161,7 @@ bool Path::is_directory () const
|
|||
{
|
||||
struct stat s = {0};
|
||||
if (! stat (_data.c_str (), &s) &&
|
||||
s.st_mode & S_IFDIR)
|
||||
S_ISDIR (s.st_mode))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -181,7 +181,7 @@ bool Path::is_link () const
|
|||
{
|
||||
struct stat s = {0};
|
||||
if (! lstat (_data.c_str (), &s) &&
|
||||
s.st_mode & S_IFLNK)
|
||||
S_ISLNK (s.st_mode))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue