Rif. mod. 95/33. Inserito il parametro pr_set nelle funzioni
TArchive::backup() e TArchive::restore(). git-svn-id: svn://10.65.10.50/trunk@1856 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
029eee0377
commit
367fce8a79
@ -320,10 +320,11 @@ bool TArchive::fbuild(const char* filename, char floppy) const
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TArchive::backup(const char* dir, char floppy, const char* desc)
|
||||
bool TArchive::backup(const char* dir, char floppy, const char* desc, bool pr_set)
|
||||
{
|
||||
const TString16 old(prefix().name());
|
||||
prefix().set(NULL);
|
||||
if (pr_set)
|
||||
prefix().set(NULL);
|
||||
|
||||
xvt_fsys_save_dir();
|
||||
chdir(dir);
|
||||
@ -354,12 +355,13 @@ bool TArchive::backup(const char* dir, char floppy, const char* desc)
|
||||
|
||||
remove(work);
|
||||
xvt_fsys_restore_dir();
|
||||
prefix().set(old);
|
||||
if (pr_set)
|
||||
prefix().set(old);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TArchive::backup(long firm, char floppy, const char* desc)
|
||||
bool TArchive::backup(long firm, char floppy, const char* desc, bool pr_set)
|
||||
{
|
||||
TString_array fl;
|
||||
const int num_ditte = build_backup_list(firm, fl);
|
||||
@ -367,14 +369,14 @@ bool TArchive::backup(long firm, char floppy, const char* desc)
|
||||
bool ok = TRUE;
|
||||
for (int f = 0; f < num_ditte; f++)
|
||||
{
|
||||
ok = backup(fl.row(f), floppy, desc);
|
||||
ok = backup(fl.row(f), floppy, desc, pr_set);
|
||||
if (!ok) break;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TArchive::restore(const char* dir, char floppy, bool tmp)
|
||||
bool TArchive::restore(const char* dir, char floppy, bool tmp, bool pr_set)
|
||||
{
|
||||
TFilename work;
|
||||
if (tmp)
|
||||
@ -404,7 +406,8 @@ bool TArchive::restore(const char* dir, char floppy, bool tmp)
|
||||
}
|
||||
|
||||
const TString16 old(prefix().name());
|
||||
prefix().set(NULL);
|
||||
if(pr_set)
|
||||
prefix().set(NULL);
|
||||
|
||||
ok = fbuild(output, floppy);
|
||||
|
||||
@ -429,12 +432,13 @@ bool TArchive::restore(const char* dir, char floppy, bool tmp)
|
||||
}
|
||||
|
||||
xvt_fsys_restore_dir();
|
||||
prefix().set(old);
|
||||
if(pr_set)
|
||||
prefix().set(old);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TArchive::restore(long firm, char floppy, bool temp)
|
||||
bool TArchive::restore(long firm, char floppy, bool temp, bool pr_set)
|
||||
{
|
||||
TString_array fl;
|
||||
const int num_ditte = build_restore_list(firm, floppy, fl);
|
||||
@ -442,7 +446,7 @@ bool TArchive::restore(long firm, char floppy, bool temp)
|
||||
bool ok = TRUE;
|
||||
for (int f = 0; f < num_ditte; f++)
|
||||
{
|
||||
ok = restore(fl.row(f), floppy, temp);
|
||||
ok = restore(fl.row(f), floppy, temp, pr_set);
|
||||
if (!ok) break;
|
||||
}
|
||||
|
||||
|
@ -32,11 +32,11 @@ protected:
|
||||
int build_restore_list(long firm, char floppy, TString_array& fl) const;
|
||||
|
||||
public:
|
||||
bool backup(const char* dir, char floppy, const char* desc);
|
||||
bool backup(long firm, char floppy, const char* desc);
|
||||
bool backup(const char* dir, char floppy, const char* desc, bool pr_set=TRUE);
|
||||
bool backup(long firm, char floppy, const char* desc, bool pr_set=TRUE);
|
||||
|
||||
bool restore(const char* dir, char floppy, bool temp);
|
||||
bool restore(long firm, char floppy, bool temp);
|
||||
bool restore(const char* dir, char floppy, bool temp, bool pr_set=TRUE);
|
||||
bool restore(long firm, char floppy, bool temp, bool pr_set=TRUE);
|
||||
|
||||
void stop_job();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user