| Line 2710... |
Line 2710... |
| 2710 |
rest = rest.FindReplace("\\", "/");
|
2710 |
rest = rest.FindReplace("\\", "/");
|
| 2711 |
|
2711 |
|
| 2712 |
// wild cards
|
2712 |
// wild cards
|
| 2713 |
if ( rest.IsAnyIn("*?") )
|
2713 |
if ( rest.IsAnyIn("*?") )
|
| 2714 |
{
|
2714 |
{
|
| 2715 |
CDirIO Dir(CFileIO(rest).GetDir());
|
2715 |
CDirIO Dir(CFileIO(rest).dir());
|
| 2716 |
CyStringList *dirList = Dir.DirList();
|
2716 |
CyStringList *dirList = Dir.DirList();
|
| 2717 |
if ( dirList )
|
2717 |
if ( dirList )
|
| 2718 |
{
|
2718 |
{
|
| 2719 |
for ( SStringList *strNode = dirList->Head(); strNode; strNode = strNode->next )
|
2719 |
for ( SStringList *strNode = dirList->Head(); strNode; strNode = strNode->next )
|
| 2720 |
{
|
2720 |
{
|
| Line 2724... |
Line 2724... |
| 2724 |
int addGame = game;
|
2724 |
int addGame = game;
|
| 2725 |
// check if the file exists in the subdirectory too, if it does, add for each game
|
2725 |
// check if the file exists in the subdirectory too, if it does, add for each game
|
| 2726 |
if ( game == GAME_ALL && !sMainGame.empty() && !otherGames.empty() ) {
|
2726 |
if ( game == GAME_ALL && !sMainGame.empty() && !otherGames.empty() ) {
|
| 2727 |
CFileIO F(file);
|
2727 |
CFileIO F(file);
|
| 2728 |
for(Utils::String g = otherGames.firstString(); !g.empty(); g = otherGames.nextString()) {
|
2728 |
for(Utils::String g = otherGames.firstString(); !g.empty(); g = otherGames.nextString()) {
|
| 2729 |
Utils::String checkDir = F.GetDir().ToString() + "/" + g;
|
2729 |
Utils::String checkDir = F.dir() + "/" + g;
|
| 2730 |
if ( CDirIO(checkDir).Exists(F.filename()) ) {
|
2730 |
if ( CDirIO(checkDir).Exists(F.filename()) ) {
|
| 2731 |
addGame = mainGame;
|
2731 |
addGame = mainGame;
|
| 2732 |
C_File *newfile = this->AppendFile(CDirIO(checkDir).File(F.filename()), filetype, CBaseFile::GetGameFromString(g), dir);
|
2732 |
C_File *newfile = this->AppendFile(CDirIO(checkDir).File(F.filename()), filetype, CBaseFile::GetGameFromString(g), dir);
|
| 2733 |
if ( newfile ) newfile->SetShared(shared);
|
2733 |
if ( newfile ) newfile->SetShared(shared);
|
| 2734 |
}
|
2734 |
}
|
| Line 2748... |
Line 2748... |
| 2748 |
int addGame = game;
|
2748 |
int addGame = game;
|
| 2749 |
// check if the file exists in the subdirectory too, if it does, add for each game
|
2749 |
// check if the file exists in the subdirectory too, if it does, add for each game
|
| 2750 |
if ( game == GAME_ALL && !sMainGame.empty() && !otherGames.empty() ) {
|
2750 |
if ( game == GAME_ALL && !sMainGame.empty() && !otherGames.empty() ) {
|
| 2751 |
CFileIO F(rest);
|
2751 |
CFileIO F(rest);
|
| 2752 |
for(Utils::String g = otherGames.firstString(); !g.empty(); g = otherGames.nextString()) {
|
2752 |
for(Utils::String g = otherGames.firstString(); !g.empty(); g = otherGames.nextString()) {
|
| 2753 |
Utils::String checkDir = F.GetDir().ToString() + "/" + g;
|
2753 |
Utils::String checkDir = F.dir() + "/" + g;
|
| 2754 |
if ( CDirIO(checkDir).Exists(F.filename()) ) {
|
2754 |
if ( CDirIO(checkDir).Exists(F.filename()) ) {
|
| 2755 |
addGame = mainGame;
|
2755 |
addGame = mainGame;
|
| 2756 |
C_File *newfile = this->AppendFile(CDirIO(checkDir).File(F.filename()), filetype, CBaseFile::GetGameFromString(g), dir);
|
2756 |
C_File *newfile = this->AppendFile(CDirIO(checkDir).File(F.filename()), filetype, CBaseFile::GetGameFromString(g), dir);
|
| 2757 |
if ( newfile ) newfile->SetShared(shared);
|
2757 |
if ( newfile ) newfile->SetShared(shared);
|
| 2758 |
}
|
2758 |
}
|
| Line 2902... |
Line 2902... |
| 2902 |
write.PushBack(CyString("Version: ") + this->version());
|
2902 |
write.PushBack(CyString("Version: ") + this->version());
|
| 2903 |
write.PushBack(CyString("File: ") + CFileIO(this->filename()).GetFilename());
|
2903 |
write.PushBack(CyString("File: ") + CFileIO(this->filename()).GetFilename());
|
| 2904 |
|
2904 |
|
| 2905 |
CFileIO File(dir + "/" + file);
|
2905 |
CFileIO File(dir + "/" + file);
|
| 2906 |
if ( File.WriteFile(&write) )
|
2906 |
if ( File.WriteFile(&write) )
|
| 2907 |
return File.GetFullFilename();
|
2907 |
return File.fullFilename();
|
| 2908 |
return NullString;
|
2908 |
return NullString;
|
| 2909 |
}
|
2909 |
}
|
| 2910 |
|
2910 |
|
| 2911 |
CyString CBaseFile::ErrorString(int error, CyString errorStr)
|
2911 |
CyString CBaseFile::ErrorString(int error, CyString errorStr)
|
| 2912 |
{
|
2912 |
{
|