Improved RepoFile path parsing. Addresses [e462e576e0]

FossilOrigin-Name: 2508cffe4829804b696668e1159332793cf0d8e7
This commit is contained in:
kostas
2012-04-29 12:19:03 +00:00
parent 2d6cbb0af2
commit e63df45a84
3 changed files with 11 additions and 12 deletions

View File

@ -42,12 +42,11 @@ struct RepoFile
FileInfo = info;
Type = type;
FilePath = getRelativeFilename(repoPath);
Path = FileInfo.absolutePath();
if(FilePath.indexOf('/')!=-1)
{
Path = FilePath;
Path = Path.left(Path.indexOf(FileInfo.fileName())-1);
}
// Strip the workspace path from the path
Q_ASSERT(Path.indexOf(repoPath)==0);
Path = Path.mid(repoPath.length()+1);
}
bool isType(EntryType t) const