fix sequential check (#1997)
This commit is contained in:
parent
831db6b5b1
commit
b5e76bca01
1 changed files with 13 additions and 11 deletions
|
@ -20,6 +20,7 @@ const char wauxslash = '\\';
|
|||
|
||||
#include "tfilepath.h"
|
||||
#include "tconvert.h"
|
||||
#include "tfiletype.h"
|
||||
#include <cmath>
|
||||
#include <cctype>
|
||||
#include <sstream>
|
||||
|
@ -73,12 +74,13 @@ bool isNumbers(std::wstring str, int fromSeg, int toSeg) {
|
|||
}
|
||||
|
||||
bool checkForSeqNum(QString type) {
|
||||
if (type == "myb" || type == "tlv" || type == "pli" || type == "tpl" ||
|
||||
type == "tnz")
|
||||
TFileType::Type typeInfo = TFileType::getInfoFromExtension(type);
|
||||
if ((typeInfo & TFileType::IMAGE) && !(typeInfo & TFileType::LEVEL))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}; // namespace
|
||||
|
||||
// TFrameId::operator string() const
|
||||
std::string TFrameId::expand(FrameFormat format) const {
|
||||
|
@ -285,10 +287,9 @@ void TFilePath::setPath(std::wstring path) {
|
|||
m_path.length() > 1 && m_path[m_path.length() - 1] == wslash)
|
||||
m_path.erase(m_path.length() - 1, 1);
|
||||
|
||||
if (isUncName &&
|
||||
!(m_path.find_last_of(L'\\') > 1 ||
|
||||
m_path.find_last_of(L'/') >
|
||||
1)) // e' indicato solo il nome della macchina...
|
||||
if (isUncName && !(m_path.find_last_of(L'\\') > 1 ||
|
||||
m_path.find_last_of(L'/') >
|
||||
1)) // e' indicato solo il nome della macchina...
|
||||
m_path.append(1, wslash);
|
||||
}
|
||||
|
||||
|
@ -631,8 +632,9 @@ TFilePath TFilePath::getParentDir() const // noSlash!
|
|||
{
|
||||
int i = getLastSlash(m_path); // cerco l'ultimo slash
|
||||
if (i < 0) {
|
||||
if (m_path.length() >= 2 && ('a' <= m_path[0] && m_path[0] <= 'z' ||
|
||||
'A' <= m_path[0] && m_path[0] <= 'Z') &&
|
||||
if (m_path.length() >= 2 &&
|
||||
('a' <= m_path[0] && m_path[0] <= 'z' ||
|
||||
'A' <= m_path[0] && m_path[0] <= 'Z') &&
|
||||
m_path[1] == ':')
|
||||
return TFilePath(m_path.substr(0, 2));
|
||||
else
|
||||
|
@ -683,7 +685,7 @@ TFrameId TFilePath::getFrame() const {
|
|||
digits++;
|
||||
number = number * 10 + str[k] - L'0';
|
||||
}
|
||||
char letter = '\0';
|
||||
char letter = '\0';
|
||||
if (iswalpha(str[k])) letter = str[k++] + ('a' - L'a');
|
||||
|
||||
if (number == 0 || k < i) // || letter!='\0')
|
||||
|
|
Loading…
Reference in a new issue