Patch level :10.0 100

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :intelligentito il modo di recuperare la directory temporanea quando falliscono i metodi standard (decisivo per l'installazione su win2003 terminal server quando si hanno delle subdirectory)


git-svn-id: svn://10.65.10.50/trunk@17040 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2008-08-08 11:31:32 +00:00
parent e00d63cf0b
commit 4776a7a1ff
2 changed files with 23 additions and 5 deletions

View File

@ -1229,10 +1229,22 @@ const TFilename& TFilename::tempdir()
_tempdir = getenv("TEMP");
if (_tempdir.empty())
_tempdir = getenv("TMP");
#ifdef WIN32
if (_tempdir.empty())
_tempdir << SLASH << "temp";
{
_tempdir = __argv[0];
_tempdir.cut(3);
_tempdir << "temp";
}
if (!_tempdir.exist())
_tempdir.format("%c%s", SLASH, "tmp");
{
_tempdir = __argv[0];
_tempdir.cut(3);
_tempdir << "tmp";
}
#else
_tempdir = "/tmp";
#endif
const int last = len()-1;
if (!is_not_slash(_str[last]))

View File

@ -42,7 +42,14 @@ static void aga_create_dir(wxString strPath)
{
const wxString strDir = strPath.Mid(0,i);
if (!::wxDirExists(strDir))
::wxMkdir(strDir);
{
if (!::wxMkdir(strDir))
{
wxString strMsg = "Impossibile creare la cartella ";
strMsg << strDir << " !!";
wxMessageBox(strMsg, "Attenzione!", wxICON_ERROR);
}
}
}
}
@ -67,8 +74,7 @@ bool aga_unzip(const char* zipfile, const char* destdir)
if (!wxEndsWithPathSeparator(strOutDir))
strOutDir += wxFILE_SEP_PATH;
strOutDir += strFileName;
if (!::wxDirExists(strOutDir))
::wxMkdir(strOutDir);
aga_create_dir(strOutDir);
}
else
{