Package: dar Version: 2.5.8-3 Severity: normal Tags: patch Dear Maintainer,
Firefox when saving a complete web page seems to like to create very long filenames, on ext4 this means 255 byte filenames (that doesn't include the path, just the filename). dar then warns and doesn't backup the file. This can be reproduced by creating a file of the maximum length, 255 for ext4, and `dar -c /tmp/test -R /tmp/path_to_file` Filename provided by the operating system seems truncated in directory /tmp/path_to_file ignoring it: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb The problem is that file doesn't get backed up. This modification changes the code to warn if it is the maximum length, and only skip if it is larger than the maximum length. I'm not sure I like the logic of ignoring it even in that case, if the file is that long, there is a problem with determining the maximum file length, if it isn't actually longer than the maximum file length, there's a bug someplace and I'm not sure skipping it helps. I would actually prefer that it not warn if it is the maximum length. The file exists, back it up, it isn't the backup program's job to critique the file names it is backing up. >From aaa60fc12f3b73b304a0b5451dd6d8ba78b4838a Mon Sep 17 00:00:00 2001 From: David Fries <da...@fries.net> Date: Tue, 30 Oct 2018 21:02:26 -0500 Subject: [PATCH 1/2] complain >= bail > --- src/libdar/etage.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libdar/etage.cpp b/src/libdar/etage.cpp index 8d444869..8187e201 100644 --- a/src/libdar/etage.cpp +++ b/src/libdar/etage.cpp @@ -156,8 +156,11 @@ namespace libdar ret->d_name[max_alloc_filename] = '\0'; // yes, one byte is allocated for the terminal zero if(strlen(ret->d_name) >= max_alloc_filename) { - ui.warning(tools_printf(gettext("Filename provided by the operating system seems truncated in directory %s ignoring it: %s"), dirname, ret->d_name)); - continue; + bool ignore = strlen(ret->d_name) > max_alloc_filename; + ui.warning(tools_printf(gettext("Filename provided by the operating system seems truncated in directory %s%s: %s"), + dirname, ignore ? " ignoring it" : "", ret->d_name)); + if(ignore) + continue; } #else while(!is_cache_dir && (ret = readdir(tmp)) != nullptr) -- 2.11.0 -- System Information: Debian Release: 9.5 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0+ (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15), LANGUAGE=C (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dar depends on: ii libassuan0 2.4.3-2 ii libattr1 1:2.4.47-2+b2 ii libbz2-1.0 1.0.6-8.1 ii libc6 2.24-11+deb9u3 ii libcap2 1:2.25-1 ii libdar64-5000 2.5.8-3+b1 ii libgcc1 1:6.3.0-18+deb9u1 ii libgcrypt20 1.7.6-2+deb9u3 ii libgpg-error0 1.26-2 ii libgpgme11 1.8.0-3+b2 ii liblzma5 5.2.2-1.2+b1 ii liblzo2-2 2.08-1.2+b2 ii libstdc++6 6.3.0-18+deb9u1 ii zlib1g 1:1.2.8.dfsg-5 dar recommends no packages. Versions of packages dar suggests: pn dar-docs <none> pn par2 <none> -- no debconf information