Skip to content

Commit

Permalink
Switched to the usage of ftp::get_upload_dir()
Browse files Browse the repository at this point in the history
  • Loading branch information
uhlin committed Jan 26, 2025
1 parent 740cca5 commit 7dc00f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/ftp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,17 +1025,17 @@ subcmd_send(CSTRING path)
return;
}

ftp::data_conn->full_path = strdup_printf("%s%s%s", g_ftp_upload_dir,
SLASH, path);
ftp::data_conn->full_path = strdup_printf("%s%s%s",
ftp::get_upload_dir(), SLASH, path);
ftp::data_conn->path = sw_strdup(path);

if (!is_regular_file(ftp::data_conn->full_path)) {
printtext_print("err", "%s: file doesn't exist or isn't a "
"regular file", ftp::data_conn->full_path);
delete_data_conn();
return;
} else if (check_path(g_ftp_upload_dir, ftp::data_conn->full_path) ==
ERR) {
} else if (check_path(ftp::get_upload_dir(), ftp::data_conn->full_path)
== ERR) {
printtext_print("err", "check path error");
delete_data_conn();
return;
Expand Down

0 comments on commit 7dc00f0

Please sign in to comment.