This commit is contained in:
Igor Pavlov
2017-04-30 00:00:00 +00:00
committed by Kornel
parent 603abd5528
commit 2efa10565a
442 changed files with 15479 additions and 8525 deletions

View File

@@ -345,7 +345,7 @@ bool CreateComplexDir(CFSTR _path)
#endif
FString path = _path;
FString path (_path);
int pos = path.ReverseFind_PathSepar();
if (pos >= 0 && (unsigned)pos == path.Len() - 1)
@@ -355,7 +355,7 @@ bool CreateComplexDir(CFSTR _path)
path.DeleteBack();
}
const FString path2 = path;
const FString path2 (path);
pos = path.Len();
for (;;)
@@ -452,11 +452,11 @@ bool RemoveDirWithSubItems(const FString &path)
if (needRemoveSubItems)
{
FString s = path;
FString s (path);
s.Add_PathSepar();
unsigned prefixSize = s.Len();
s += FCHAR_ANY_MASK;
NFind::CEnumerator enumerator(s);
const unsigned prefixSize = s.Len();
NFind::CEnumerator enumerator;
enumerator.SetDirPrefix(s);
NFind::CFileInfo fi;
while (enumerator.Next(fi))
{
@@ -580,18 +580,18 @@ static bool CreateTempFile(CFSTR prefix, bool addRandom, FString &path, NIO::COu
path = prefix;
if (addRandom)
{
FChar s[16];
UInt32 value = d;
char s[16];
UInt32 val = d;
unsigned k;
for (k = 0; k < 8; k++)
{
unsigned t = value & 0xF;
value >>= 4;
s[k] = (FChar)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
unsigned t = val & 0xF;
val >>= 4;
s[k] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
}
s[k] = '\0';
if (outFile)
path += FChar('.');
path += '.';
path += s;
UInt32 step = GetTickCount() + 2;
if (step == 0)
@@ -600,7 +600,7 @@ static bool CreateTempFile(CFSTR prefix, bool addRandom, FString &path, NIO::COu
}
addRandom = true;
if (outFile)
path += FTEXT(".tmp");
path += ".tmp";
if (NFind::DoesFileOrDirExist(path))
{
SetLastError(ERROR_ALREADY_EXISTS);