summaryrefslogtreecommitdiffabout
path: root/src/gpg.c
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-10 20:12:02 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-10 21:28:52 (GMT)
commitdb81e378576dcc5510032c72060e48e562f208c9 (patch) (side-by-side diff)
tree914c5f277a5fad050527a5c5da815f521e8023dc /src/gpg.c
parent84db86f0151385a8f05483bf691fde86b4e4e153 (diff)
downloadwydawca-db81e378576dcc5510032c72060e48e562f208c9.tar.gz
wydawca-db81e378576dcc5510032c72060e48e562f208c9.tar.bz2
Remove save-cwd.
* src/pushd.c: New file. * src/Makefile.am: Add pushd.c * src/wydawca.h (push_dir, pop_dir): New functions. * src/diskio.c: Use push_dir/pop_dir. * src/exec.c: Likewise. * src/gpg.c: Likewise. * gnulib.modules: Remove save-cwd. * tests/pushck.c: New file. * tests/pushdir.at: New file. * tests/testsuite.at: Add pushdir.at * tests/Makefile.am: Likewise. * tests/.gitignore: Add pushck.
Diffstat (limited to 'src/gpg.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/gpg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpg.c b/src/gpg.c
index 979d0c0..474d94b 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -17,7 +17,6 @@
/* GPG interface functions */
#include "wydawca.h"
-#include "save-cwd.h"
#include <gpgme.h>
#define fail_if_err(expr) \
@@ -91,16 +90,15 @@ static int
rmdir_r (const char *name)
{
int rc;
- struct saved_cwd cwd;
- if (save_cwd (&cwd))
+ if (push_dir (NULL))
{
logmsg (LOG_ERR, _("cannot save current directory: %s"),
strerror (errno));
return 1;
}
rc = recursive_rmdir (name);
- if (restore_cwd (&cwd))
+ if (pop_dir ())
{
logmsg (LOG_ERR, _("cannot restore current directory: %s"),
strerror (errno));

Return to:

Send suggestions and report system problems to the System administrator.