mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
common: Never remove /dev/null.
* common/sysutils.c (gnupg_remove): Detect /dev/null. -- GnuPG-bug-id: 6556 (cherry picked from commit 7f9e05d73f2ca1ecde1b7ba406d139a19d007998)
This commit is contained in:
parent
6d45fcdd3c
commit
8d01725a96
@ -812,7 +812,12 @@ gnupg_remove (const char *fname)
|
||||
return -1;
|
||||
return 0;
|
||||
#else
|
||||
return remove (fname);
|
||||
/* It is common to use /dev/null for testing. We better don't
|
||||
* remove that file. */
|
||||
if (fname && !strcmp (fname, "/dev/null"))
|
||||
return 0;
|
||||
else
|
||||
return remove (fname);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user