mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
common: Never remove /dev/null.
* common/sysutils.c (gnupg_remove): Detect /dev/null. -- GnuPG-bug-id: 6556
This commit is contained in:
parent
a02f3cc4e8
commit
7f9e05d73f
@ -810,6 +810,11 @@ gnupg_remove (const char *fname)
|
|||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
|
/* 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);
|
return remove (fname);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user