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
+11 -5
View File
@@ -227,7 +227,7 @@ bool CStreamInfo::IsMainStream() const throw()
UString CStreamInfo::GetReducedName() const
{
// remove ":$DATA" postfix, but keep postfix, if Name is "::$DATA"
UString s = Name;
UString s (Name);
if (s.Len() > 6 + 1 && StringsAreEqualNoCase_Ascii(s.RightPtr(6), ":$DATA"))
s.DeleteFrom(s.Len() - 6);
return s;
@@ -453,7 +453,7 @@ bool CFileInfo::Find(CFSTR path)
if (colonPos >= 0 && path[(unsigned)colonPos + 1] != 0)
{
UString streamName = fs2us(path + (unsigned)colonPos);
FString filePath = path;
FString filePath (path);
filePath.DeleteFrom(colonPos);
/* we allow both cases:
name:stream
@@ -462,7 +462,7 @@ bool CFileInfo::Find(CFSTR path)
const unsigned kPostfixSize = 6;
if (streamName.Len() <= kPostfixSize
|| !StringsAreEqualNoCase_Ascii(streamName.RightPtr(kPostfixSize), ":$DATA"))
streamName += L":$DATA";
streamName += ":$DATA";
bool isOk = true;
@@ -559,9 +559,9 @@ bool CFileInfo::Find(CFSTR path)
{
if (NName::FindSepar(path + prefixSize) < 0)
{
FString s = path;
FString s (path);
s.Add_PathSepar();
s += FCHAR_ANY_MASK;
s += '*'; // CHAR_ANY_MASK
bool isOK = false;
if (finder.FindFirst(s, *this))
@@ -618,6 +618,12 @@ bool DoesFileOrDirExist(CFSTR name)
}
void CEnumerator::SetDirPrefix(const FString &dirPrefix)
{
_wildcard = dirPrefix;
_wildcard += '*';
}
bool CEnumerator::NextAny(CFileInfo &fi)
{
if (_findFile.IsHandleAllocated())