Modificato il direttorio dei files temporanei
git-svn-id: svn://10.65.10.50/trunk@557 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
aa91be2d8e
commit
fb598c49fc
@ -3,6 +3,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <strstream.h>
|
||||
#include <applicat.h>
|
||||
|
||||
#include <strings.h>
|
||||
#if XVT_OS==XVT_OS_SCOUNIX
|
||||
@ -589,8 +590,8 @@ const TFilename& TFilename::tempdir()
|
||||
if (dirpref == NULL) dirpref = "/tmp";
|
||||
set(dirpref);
|
||||
const int last = len()-1;
|
||||
if (!is_not_slash(_str[last])) cut(last);
|
||||
|
||||
if (!is_not_slash(_str[last])) cut(last);
|
||||
if (!fexist(_str))
|
||||
{
|
||||
int res =
|
||||
@ -599,9 +600,26 @@ const TFilename& TFilename::tempdir()
|
||||
#else
|
||||
mkdir(_str);
|
||||
#endif
|
||||
if (res == 0)
|
||||
message_box("E' stata creata la directory per i file temporanei '%s'", _str);
|
||||
else
|
||||
if (res != 0)
|
||||
fatal_box("Impossibile creare la directory '%s' per i file temporanei", _str);
|
||||
}
|
||||
if (not_empty()) *this << "/" ;
|
||||
TString16 u(main_app().user());
|
||||
|
||||
u.lower();
|
||||
*this << u;
|
||||
if (!fexist(_str))
|
||||
{
|
||||
int res =
|
||||
#if XVT_OS==XVT_OS_SCOUNIX
|
||||
mkdir(_str, 0777);
|
||||
#else
|
||||
mkdir(_str);
|
||||
#endif
|
||||
// if (res == 0)
|
||||
// message_box("E' stata creata la directory per i file temporanei '%s'", _str);
|
||||
// else
|
||||
if (res != 0)
|
||||
fatal_box("Impossibile creare la directory '%s' per i file temporanei", _str);
|
||||
}
|
||||
return *this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user