X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Fmain.c;h=0f43cb7e1de0f64d4f7637d1dce2032708aa8054;hp=361c4ecd4b4e190e01e03a251011e783a2e2ed3a;hb=30e8407d4ff60da69e6f6202267eb8c705743b5d;hpb=35ed8cf887b00613ffa27f7259ef081830f447e2 diff --git a/restore/main.c b/restore/main.c index 361c4ec..0f43cb7 100644 --- a/restore/main.c +++ b/restore/main.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.47 2004/12/15 11:00:01 stelian Exp $"; + "$Id: main.c,v 1.48 2005/01/13 15:41:06 stelian Exp $"; #endif /* not lint */ #include @@ -112,6 +112,7 @@ char filesys[NAMELEN]; static const char *stdin_opt = NULL; char *bot_script = NULL; dump_ino_t volinfo[TP_NINOS]; +int wdfd; #ifdef USE_QFA FILE *gTapeposfp; @@ -356,6 +357,10 @@ main(int argc, char *argv[]) else setinput(inputdev); + wdfd = open(".", O_RDONLY); + if (wdfd < 0) + err(1, "can't get current directory"); + if (argc == 0 && !filelist) { argc = 1; *--argv = ".";