Skip to content

Commit

Permalink
Merge pull request #2940 from jmbreuer/upstream
Browse files Browse the repository at this point in the history
Fix DVD resume: accept .IFO files regardless of file name case
  • Loading branch information
Voyager1 committed Jul 8, 2013
2 parents fe1856c + d25d6ef commit dc8d003
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xbmc/filesystem/IDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ bool IDirectory::IsAllowed(const CStdString& strFile) const
CStdString fileName = URIUtils::GetFileName(strFile);

// Allow filenames of the form video_ts.ifo or vts_##_0.ifo
return fileName == "video_ts.ifo" ||
(fileName.length() == 12 && fileName.Left(4) == "vts_" &&
fileName.Right(6) == "_0.ifo");
return fileName.Equals("video_ts.ifo") ||
(fileName.length() == 12 && fileName.Left(4).Equals("vts_") &&
fileName.Right(6).Equals("_0.ifo"));
}

if (URIUtils::HasExtension(strFile, ".dat"))
Expand All @@ -73,8 +73,8 @@ bool IDirectory::IsAllowed(const CStdString& strFile) const
// Allow filenames of the form AVSEQ##(#).DAT, ITEM###(#).DAT
// and MUSIC##(#).DAT
return (fileName.length() == 11 || fileName.length() == 12) &&
(fileName.Left(5) == "AVSEQ" || fileName.Left(5) == "MUSIC" ||
fileName.Left(4) == "ITEM");
(fileName.Left(5).Equals("AVSEQ") || fileName.Left(5).Equals("MUSIC") ||
fileName.Left(4).Equals("ITEM"));
}

return true;
Expand Down

0 comments on commit dc8d003

Please sign in to comment.