Patch level :4.0 822
Files correlati : Ricompilazione Demo : [ ] Commento :sistemato problema della chiamata della dir setup che va solo nella 4.0 git-svn-id: svn://10.65.10.50/trunk@15818 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
73523fbd69
commit
91082d2ae9
@ -1178,29 +1178,37 @@ bool TMenu_application::copy_setup(const TString& remote_path)
|
|||||||
|
|
||||||
TFilename remote_setupdir = remote_path;
|
TFilename remote_setupdir = remote_path;
|
||||||
remote_setupdir.add(local_setupdir.name());
|
remote_setupdir.add(local_setupdir.name());
|
||||||
remote_setupdir.add("*.*");
|
//controlla se esiste la directory;è necessario in quanto se è una vecchia 4.0 potrebbe non esserci
|
||||||
|
if (remote_setupdir.exist())
|
||||||
TString_array ar;
|
|
||||||
list_files(remote_setupdir, ar);
|
|
||||||
|
|
||||||
if (!ar.empty())
|
|
||||||
{
|
{
|
||||||
make_dir(local_setupdir);
|
remote_setupdir.add("*.*");
|
||||||
|
|
||||||
|
TString_array ar;
|
||||||
|
list_files(remote_setupdir, ar);
|
||||||
|
|
||||||
|
if (!ar.empty())
|
||||||
|
{
|
||||||
|
make_dir(local_setupdir);
|
||||||
|
|
||||||
|
ok = true;
|
||||||
|
TFilename strsrc, strdst;
|
||||||
|
FOR_EACH_ARRAY_ROW (ar, i, row)
|
||||||
|
{
|
||||||
|
strsrc = *row;
|
||||||
|
strdst = local_setupdir;
|
||||||
|
strdst.add(strsrc.name());
|
||||||
|
//se la copia dei files si inchioda esce
|
||||||
|
if (!fcopy(strsrc, strdst))
|
||||||
|
{
|
||||||
|
ok = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} ////FOR_EACH_ARRAY...
|
||||||
|
} //if(!ar.empty...
|
||||||
|
} //if(remote_setupdir...
|
||||||
|
else //se non esiste la remote_setupdir esce con false (e' una vecchia 4.0)
|
||||||
|
ok = false;
|
||||||
|
|
||||||
ok = true;
|
|
||||||
TFilename strsrc, strdst;
|
|
||||||
FOR_EACH_ARRAY_ROW (ar, i, row)
|
|
||||||
{
|
|
||||||
strsrc = *row;
|
|
||||||
strdst = local_setupdir;
|
|
||||||
strdst.add(strsrc.name());
|
|
||||||
if (!fcopy(strsrc, strdst))
|
|
||||||
{
|
|
||||||
ok = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user