D16249: Warn user before copy/move job if the file size exceeds the maximum possible file size in FAT32 file system(4 GB)

Stefan BrĂ¼ns noreply at phabricator.kde.org
Thu Oct 18 21:47:48 BST 2018


bruns added inline comments.

INLINE COMMENTS

> copyjob.cpp:1622
> +
> +            if (fileSystem == KFileSystemType::Fat && (*it).size > 4294967296) { // 4 GB = 4294967296 Bytes
> +                q->setError(ERR_FILE_TOO_LARGE_FOR_FAT32);

why not `1 << 32 - 1` ?
Also note the `- 1`, 2  ^ 32  is 0, as FAT32 uses a uint32_t for the file size.

> job_error.cpp:249
> +    case KIO::ERR_FILE_TOO_LARGE_FOR_FAT32:
> +        result = i18n("The file named %1 cannot be transferred because its size is greater than 4 GB,"
> +                      " and the destination's filesystem does not support files that large.", errorText);

%1 with quotes please, as it can contain whitespace, so it would be hard to spot where the filename ends.
I would also prefer a sentence where the reason is given first, e.g.
`The destination filesystem only supports files up to 4GB. "%1" is to large an can not be transferred.`

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D16249

To: shubham, ngraham, elvisangelaccio, #frameworks
Cc: bruns, kde-frameworks-devel, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181018/8d901f87/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list