ahmadsamir added a comment.
IIUC, FILENAME_MAX corresponds to PATH_MAX, 4096 (bytes; or chars in an array). NAME_MAX is the max. filename (the filename part only, without the canonical path) length, this is 255 on Linux. So using FILENAME_MAX is correct in the code. See: https://www.gnu.org/software/libc/manual/html_node/Limits-for-Files.html , which talks about FILENAME_MAX, NAME_MAX and PATH_MAX .... \o/ /usr/include/stdio.h (from glibc-devel) /usr/include/bits/stdio_lim.h And: /usr/include/linux/limits.h: #define NAME_MAX 255 /* # chars in a file name */ #define PATH_MAX 4096 /* # chars in a path name including nul */ REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D24489 To: mardelle, #frameworks, dfaure Cc: ahmadsamir, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns