diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-31 11:21:30 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-31 13:51:49 +0100 |
commit | cdccc69c62579b0c13b35fad0728079652b8f3c9 (patch) | |
tree | 9fa54c710f73c5e08a9c8466e7a712eb63ee07ac /lib/compat/chdir.c | |
parent | 2182129c8f359c4fa1390eaba7a65b595ccd4182 (diff) |
Move library source into src sub-directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/compat/chdir.c')
-rw-r--r-- | lib/compat/chdir.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/compat/chdir.c b/lib/compat/chdir.c deleted file mode 100644 index f695e2a..0000000 --- a/lib/compat/chdir.c +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * chdir.c - * - * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> - */ -#include "config.h" -#include "compat.h" - -#ifdef _WIN32 -#include <stdlib.h> -#include <stdio.h> - -int chdir(const char *path) -{ - WCHAR *wpath; - int ret; - - wpath = path_to_windows(path); - if (wpath == NULL) - return -1; - - if (!SetCurrentDirectoryW(wpath)) { - fprintf(stderr, "Switching to directory '%s': %ld\n", - path, GetLastError()); - ret = -1; - } else { - ret = 0; - } - - free(wpath); - return ret; -} -#endif |