Skip to content

Commit

Permalink
Fixed Synchronous GetFileSize always returning 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto Römmich committed Aug 22, 2019
1 parent 382d49f commit b156a70
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions FluentFTP/Client/FtpClient_FileManagement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,18 +1007,15 @@ public virtual long GetFileSize(string path) {
return -1;
}

long length = 0;

FtpSizeReply sizeReply = new FtpSizeReply();
#if !CORE14
lock (m_lock) {
#endif
FtpSizeReply sizeReply = new FtpSizeReply();
GetFileSizeInternal(path, sizeReply);
#if !CORE14
}
#endif

return length;
return sizeReply.FileSize;
}

/// <summary>
Expand Down

0 comments on commit b156a70

Please sign in to comment.