mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-05 12:18:00 +02:00
ply-utils: Use lstat instead of stat for ply_file_exists
If a file is a symlink, we usually want to follow it, so testing the symlink itself, is less than optimal. This commit switches to lstat instead of stat.
This commit is contained in:
parent
746078e89d
commit
e989867f48
1 changed files with 1 additions and 1 deletions
|
|
@ -518,7 +518,7 @@ ply_file_exists (const char *file)
|
|||
{
|
||||
struct stat file_info;
|
||||
|
||||
if (stat (file, &file_info) < 0)
|
||||
if (lstat (file, &file_info) < 0)
|
||||
return false;
|
||||
|
||||
return S_ISREG (file_info.st_mode);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue