summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2015-06-15 19:08:28 +0200
committer/dev/humancontroller <devhc@example.com>2017-02-07 17:34:59 +0100
commit89e3e3215e93439e265068facfc36b508d52a05b (patch)
treece80753c84d3d7e8710800e0c2e85dfd6baee519 /src/sys
parentbea348d828fee2675edc5cfc9b18ad000a96a6ac (diff)
stop referencing the current working directory
remove Sys_GetCwd()
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/sys_main.c5
-rw-r--r--src/sys/sys_unix.c18
-rw-r--r--src/sys/sys_win32.c14
3 files changed, 1 insertions, 36 deletions
diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c
index fbb0c5b4..c45b96c8 100644
--- a/src/sys/sys_main.c
+++ b/src/sys/sys_main.c
@@ -83,10 +83,7 @@ Sys_DefaultInstallPath
*/
char *Sys_DefaultInstallPath(void)
{
- if (*installPath)
- return installPath;
- else
- return Sys_Cwd();
+ return installPath;
}
/*
diff --git a/src/sys/sys_unix.c b/src/sys/sys_unix.c
index 22af0fcf..3caed9fd 100644
--- a/src/sys/sys_unix.c
+++ b/src/sys/sys_unix.c
@@ -238,24 +238,6 @@ FILE *Sys_Mkfifo( const char *ospath )
}
/*
-==================
-Sys_Cwd
-==================
-*/
-char *Sys_Cwd( void )
-{
- static char cwd[MAX_OSPATH];
-
- char *result = getcwd( cwd, sizeof( cwd ) - 1 );
- if( result != cwd )
- return NULL;
-
- cwd[MAX_OSPATH-1] = 0;
-
- return cwd;
-}
-
-/*
==============================================================
DIRECTORY SCANNING
diff --git a/src/sys/sys_win32.c b/src/sys/sys_win32.c
index d8e589b0..fb0f51a7 100644
--- a/src/sys/sys_win32.c
+++ b/src/sys/sys_win32.c
@@ -294,20 +294,6 @@ FILE *Sys_Mkfifo( const char *ospath )
}
/*
-==============
-Sys_Cwd
-==============
-*/
-char *Sys_Cwd( void ) {
- static char cwd[MAX_OSPATH];
-
- _getcwd( cwd, sizeof( cwd ) - 1 );
- cwd[MAX_OSPATH-1] = 0;
-
- return cwd;
-}
-
-/*
==============================================================
DIRECTORY SCANNING