Skip to content

Commit 81135da

Browse files
committed
Removing some empty lines
1 parent 7fbf8b7 commit 81135da

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

dlls/dir.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,15 @@ HANDLE FindDirectory(HANDLE hFile, char* dirname, const char* dirspec)
118118
/// <summary>
119119
/// Returns true if the path has any sub-directories
120120
/// </summary>
121-
bool HasSubDirectories(char* path) {
121+
bool HasSubDirectories(const char* path) {
122122
char search_path[MAX_PATH];
123123
char dirname[MAX_PATH];
124124
#ifndef __linux__
125125
HANDLE directory = nullptr;
126126
#else
127127
DIR* directory = nullptr;
128128
#endif
129-
130-
131129
std::strcpy(search_path, path);
132-
133130
#ifndef __linux__
134131
std::strcat(search_path, "/*");
135132
#endif

dlls/dir.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ DIR* FindDirectory(DIR* directory, char* dirname, const char* dirspec);
5656

5757
#endif
5858

59-
bool HasSubDirectories(char* path);
59+
bool HasSubDirectories(const char* path);
6060

6161
#endif

dlls/globals.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,9 +1381,9 @@ void CBotGlobals::LoadBotModels()
13811381
std::strcat(path, "\\models\\player");
13821382
#endif
13831383

1384-
if (stat(path, &stat_str) != 0)
1384+
if (stat(path, &stat_str) != 0 || !HasSubDirectories(path))
13851385
{
1386-
// use the valve/models/player directory if no MOD models/player
1386+
// use the valve/models/player directory if no valid MOD models/player
13871387
#ifdef __linux__
13881388
std::strcpy(path, "valve/models/player");
13891389
#else

0 commit comments

Comments
 (0)