mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[sftp] Workaround for symlink to directory
Won't work for files with 4096 bytes size, or bigger directories.
This commit is contained in:
parent
430c3fea93
commit
5c0e8fb889
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user