mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
Return empty string instead of 1 as adler32 checksum for empty files
This commit is contained in:
parent
23f7c51f70
commit
1aa1ea7bea
1 changed files with 4 additions and 0 deletions
|
@ -114,6 +114,10 @@ QByteArray calcSha1(QIODevice *device)
|
|||
#ifdef ZLIB_FOUND
|
||||
QByteArray calcAdler32(QIODevice *device)
|
||||
{
|
||||
if (device->size() == 0)
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
QByteArray buf(BUFSIZE, Qt::Uninitialized);
|
||||
|
||||
unsigned int adler = adler32(0L, Z_NULL, 0);
|
||||
|
|
Loading…
Reference in a new issue