mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Division by zero
This commit is contained in:
parent
305402a046
commit
ee6205482e
2 changed files with 4 additions and 4 deletions
|
|
@ -550,7 +550,7 @@ begin
|
|||
begin
|
||||
FLastError:= libssh2_session_last_errno(FSession);
|
||||
if (FLastError <> LIBSSH2_ERROR_EAGAIN) then Exit(False);
|
||||
DoProgress((FileSize - TotalBytesToWrite) * 100 div FileSize);
|
||||
if (FileSize > 0) then DoProgress((FileSize - TotalBytesToWrite) * 100 div FileSize);
|
||||
FSock.CanRead(10);
|
||||
end;
|
||||
until not ((TargetHandle = nil) and (FLastError = LIBSSH2_ERROR_EAGAIN));
|
||||
|
|
@ -621,7 +621,7 @@ begin
|
|||
begin
|
||||
FLastError:= libssh2_session_last_errno(FSession);
|
||||
if (FLastError <> LIBSSH2_ERROR_EAGAIN) then Exit(False);
|
||||
DoProgress((FileSize - TotalBytesToRead) * 100 div FileSize);
|
||||
if (FileSize > 0) then DoProgress((FileSize - TotalBytesToRead) * 100 div FileSize);
|
||||
FSock.CanRead(10);
|
||||
end;
|
||||
until not ((SourceHandle = nil) and (FLastError = LIBSSH2_ERROR_EAGAIN));
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ begin
|
|||
begin
|
||||
FLastError:= libssh2_session_last_errno(FSession);
|
||||
if (FLastError <> LIBSSH2_ERROR_EAGAIN) then Exit(False);
|
||||
DoProgress((FileSize - TotalBytesToWrite) * 100 div FileSize);
|
||||
if (FileSize > 0) then DoProgress((FileSize - TotalBytesToWrite) * 100 div FileSize);
|
||||
FSock.CanRead(10);
|
||||
end;
|
||||
until not ((TargetHandle = nil) and (FLastError = LIBSSH2_ERROR_EAGAIN));
|
||||
|
|
@ -310,7 +310,7 @@ begin
|
|||
begin
|
||||
FLastError:= libssh2_session_last_errno(FSession);
|
||||
if (FLastError <> LIBSSH2_ERROR_EAGAIN) then Exit(False);
|
||||
DoProgress((FileSize - TotalBytesToRead) * 100 div FileSize);
|
||||
if (FileSize > 0) then DoProgress((FileSize - TotalBytesToRead) * 100 div FileSize);
|
||||
FSock.CanRead(10);
|
||||
end;
|
||||
until not ((SourceHandle = nil) and (FLastError = LIBSSH2_ERROR_EAGAIN));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue