Corretta TFilename::tempdir(). Non funzionava per nomi utente
lunghi 7 chars. git-svn-id: svn://10.65.10.50/trunk@4575 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a2a967d125
commit
67b62e323e
@ -127,11 +127,11 @@ TString::TString(const TString& s) : _str(NULL), _size(0)
|
|||||||
|
|
||||||
TString::TString(int size, char c) : _str(NULL), _size(0)
|
TString::TString(int size, char c) : _str(NULL), _size(0)
|
||||||
{
|
{
|
||||||
resize(size, FALSE);
|
resize(size, FALSE);
|
||||||
*(_str+size--)='\0';
|
*(_str+size--)='\0';
|
||||||
for (;c && size>=0; size--)
|
for (;c && size>=0; size--)
|
||||||
*(_str+size)=c;
|
*(_str+size)=c;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TString::TString() : _str(NULL), _size(0)
|
TString::TString() : _str(NULL), _size(0)
|
||||||
@ -1070,7 +1070,8 @@ const TFilename& TFilename::tempdir()
|
|||||||
if (theuser.empty())
|
if (theuser.empty())
|
||||||
theuser = "prassi";
|
theuser = "prassi";
|
||||||
theuser.lower();
|
theuser.lower();
|
||||||
if (theuser.not_empty() && _tempdir.find(theuser) != _tempdir.len() - theuser.len())
|
const int f = _tempdir.find(theuser);
|
||||||
|
if (f < 0 || f != _tempdir.len() - theuser.len())
|
||||||
_tempdir << SLASH << theuser;
|
_tempdir << SLASH << theuser;
|
||||||
_tempdir.lower();
|
_tempdir.lower();
|
||||||
if (!fexist(_tempdir))
|
if (!fexist(_tempdir))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user