https://git.reactos.org/?p=reactos.git;a=commitdiff;h=278f563e04eb6a44fb3e6…
commit 278f563e04eb6a44fb3e66641d4cc14999bdcd6b
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed May 13 13:42:18 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed May 13 13:42:18 2020 +0900
[FTP] Don't hardcode C: drive (#2767)
CORE-13235
---
base/applications/network/ftp/main.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/base/applications/network/ftp/main.c b/base/applications/network/ftp/main.c
index 44b10fb6970..f2b1c9a0bb3 100644
--- a/base/applications/network/ftp/main.c
+++ b/base/applications/network/ftp/main.c
@@ -227,7 +227,16 @@ int main(int argc, const char *argv[])
(void) strcpy(home, pw->pw_dir);
}
#endif
- strcpy(home, "C:/");
+ cp = getenv("SystemDrive");
+ if (cp != NULL && *cp != 0)
+ {
+ strcpy(home, cp);
+ strcat(home, "/");
+ }
+ else
+ {
+ strcpy(home, "C:/");
+ }
if (argc > 0) {
if (setjmp(toplevel))
exit(0);