Skip to content

Instantly share code, notes, and snippets.

@Amanieu
Created April 3, 2014 22:23
Show Gist options
  • Save Amanieu/9964087 to your computer and use it in GitHub Desktop.
Save Amanieu/9964087 to your computer and use it in GitHub Desktop.
diff --git a/src/engine/framework/FileSystem.cpp b/src/engine/framework/FileSystem.cpp
index 95287e0..1a60afd 100644
--- a/src/engine/framework/FileSystem.cpp
+++ b/src/engine/framework/FileSystem.cpp
@@ -2398,7 +2398,9 @@ int FS_GetFileList(const char* path, const char* extension, char* listBuf, int b
return 0;
int numFiles;
- char** list = FS_ListFiles(path, extension, &numFiles);
+ char buffer[1024] = "game/";
+ Q_strcat(buffer, sizeof(buffer), path);
+ char** list = FS_ListFiles(buffer, extension, &numFiles);
for (int i = 0; i < numFiles; i++) {
int length = strlen(list[i]) + 1;
diff --git a/src/engine/server/sv_ccmds.cpp b/src/engine/server/sv_ccmds.cpp
index c1f7b1a..1dc4f4c 100644
--- a/src/engine/server/sv_ccmds.cpp
+++ b/src/engine/server/sv_ccmds.cpp
@@ -85,7 +85,7 @@ class MapCmd: public Cmd::StaticCmd {
}
return out;
} else if (argNum > 1) {
- return FS::HomePath::CompleteFilename(prefix, "layouts/" + args.Argv(1), ".dat", false, true);
+ return FS::HomePath::CompleteFilename(prefix, "game/layouts/" + args.Argv(1), ".dat", false, true);
}
return {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment