JCR *jcr;
BSOCK *dir = (BSOCK *)dirp;
const char jobname[12] = "*Director*";
+ saveCWD save_cwd;
jcr = new_jcr(sizeof(JCR), filed_free_jcr); /* create JCR */
jcr->dir_bsock = dir;
jcr->ff = init_find_files();
+ save_cwd.save(jcr);
jcr->start_time = time(NULL);
jcr->RunScripts = New(alist(10, not_owned_by_alist));
jcr->last_fname = get_pool_memory(PM_FNAME);
ff->fileset = NULL;
Dmsg0(100, "Calling term_find_files\n");
term_find_files(jcr->ff);
+ save_cwd.restore(jcr);
+ save_cwd.release();
jcr->ff = NULL;
Dmsg0(100, "Done with term_find_files\n");
free_jcr(jcr); /* destroy JCR record */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2001-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
#include "jcr.h"
#include "bfile.h"
+#include "savecwd.h"
#include "../filed/fd_plugins.h"
#ifdef HAVE_DIRENT_H
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
/*
* Kern Sibbald, August MMVII
*
- * Version $Id$
*/
#include "bacula.h"
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
/*
* Kern Sibbald, August MMVII
*
- * Version $Id$
*/
#ifndef _SAVECWD_H