Package: dirvish Version: 1.2.1-1.3 Severity: normal -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Dear maintainer, The "tree" configuration option accepts an "alias" which causes the index of all files in a vault to have a different path. There is a bug in an old bugfix which causes misparsing. The following can be observed: Statement: tree: /somewhere Effect: $srctree = "/somewhere" $aliastree is empty Correct! Statement: tree: /somewhere/ Effect: $srctree = "/somewhere" $aliastree is empty Correct! Trailing slashes are removed. Statement: tree: /somewhere/ /alias Effect: $srctree = "/somewhere" $aliastree = "/alias" Correct! But accidentally. This is probably why the bug was not spotted when it was introduced. Statement: tree: /somewhere /alias Effect: $srctree = "/somewher" $aliastree = "/alias" Wrong! This is because of the following snippet: - --8<---------------cut here---------------start------------->8--- #+SIS: KHL 2005-02-18 SpacesInSource fix #-SIS: ($srctree, $aliastree) = split(/\s+/, $$Options{tree}) ($srctree, $aliastree) = split(/[^\\]\s+/, $$Options{tree}) or seppuku 228, "ERROR: no source tree defined"; $srctree =~ s(\\ )( )g; #+SIS $srctree =~ s(/+$)(); - --8<---------------cut here---------------end--------------->8--- So what happened on the last example? The split statement splits the string "/somewhere /alias" into the components: First part: "/somewher" Separator: "e " Second part: "/alias" So the last character of the first part is gobbled as part of the separator. Since an optional trailing slash is also removed, as long as a trailing slash is used on the first part, everything still works. But not including the trailing slash is a perfectly valid configuration. I don't know any Perl, so I don't know the correct way to fix this. I had a quick look and didn't see it. Cheers, Peter. - -- System Information: Debian Release: 9.3 APT prefers stable-updates APT policy: (990, 'stable-updates'), (990, 'stable'), (610, 'testing'), (600, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386, armhf Kernel: Linux 4.9.0-5-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dirvish depends on: ii libtime-modules-perl 2015.103-2 ii libtime-period-perl 1.20-8.2 ii perl 5.24.1-3+deb9u2 ii perl-modules-5.24 [perl-modules] 5.24.1-3+deb9u2 ii rsync 3.1.2-1+deb9u1 Versions of packages dirvish recommends: pn ssh <none> dirvish suggests no packages. - -- no debconf information -----BEGIN PGP SIGNATURE----- iQFMBAEBCAA2FiEEZQCNwiCq4qJXTWzVlp4Bj95s3KEFAlqENdMYHHBldGVyQGRp Z2l0YWxicmFpbnMuY29tAAoJEJaeAY/ebNyhA7oH/3fop7cthO1D+8jufZNFBnaK kvNup5afXdBG7n1DC+FjPg8IqjiTQgsdzg4Q875h+anjFKNQuvROoYlpzwRwsjEI OinjA/GZfzSxrwjGrx1kO8CcoL/B9ucppE1KXctc7qy6lO2KlqfMzoX/ZidV7Db1 GlgaCoBFeiWo+aqpAbBmlPi6M8xKpZj8k7BteHzklxJeWiDcym7B87IR1Q+Vntw5 sw8OzyVQzBGJgYcq4dZeHQ8xHd67sCaUTZGWdzQgIjdhWt1Aw2EtyMumT0q5u6rA /NFcbvjt3GwQJ5oM/d8xXfYWZF0g/sabLbC6M+UydDDG4iu7cQ7kqem8cAzuRWk= =+yoZ -----END PGP SIGNATURE-----