X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Fmain.c;h=0f43cb7e1de0f64d4f7637d1dce2032708aa8054;hp=f53d740513c1718b9c156bde174737c15e1edc7a;hb=684154694394c35b594ca101b15796898888ebde;hpb=cc7747ebe3cb5b31e059155a8bb1ee4cecc67236 diff --git a/restore/main.c b/restore/main.c index f53d740..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.46 2004/04/13 13:04:33 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 = "."; @@ -427,9 +432,10 @@ main(int argc, char *argv[]) err(1, "cannot cd to %s", filesys); compare_ignore_not_found = dumptime > 0; initsymtable((char *)0); - extractdirs(0); + extractdirs(1); treescan(".", ROOTINO, nodeupdates); compareleaves(); + comparedirmodes(); checkrestore(); if (compare_errors) { printf("Some files were modified!\n");