1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

[sftp] Workaround for symlink to directory

Won't work for files with 4096 bytes size, or bigger directories.
This commit is contained in:
Witold Filipczyk 2023-06-21 17:47:41 +02:00
parent 430c3fea93
commit 5c0e8fb889

View File

@ -470,6 +470,15 @@ again:
if (res == CURLE_REMOTE_FILE_NOT_FOUND) {
ftp->dir = 1;
add_char_to_string(&u, '/');
} else {
off_t size = -1;
curl_easy_getinfo(ftp->easy, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &size);
if (conn->uri->protocol == PROTOCOL_SFTP && size == 4096L) {
ftp->dir = 1;
add_char_to_string(&u, '/');
}
}
first_time = 0;
goto again;