Package: dar
Version: 2.3.9-1
Severity: normal
Tags: patch

When running dar in --merge mode with the --exclude-from-file option, dar exits
with the error message:

Parse error on command line (or included files): Mask_list's prefix must be an
absolute path

The attached patch fixes this. Also posted to the dar-support mailing list:
http://sourceforge.net/mailarchive/forum.php?thread_name=4A6055E4.5080802%40vanbest.org&forum_name=dar-support

Cheers

Jan-Pascal

-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (990, 'stable'), (400, 'testing'), (200, 'unstable'), (101, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dar depends on:
ii  libattr1               1:2.4.43-2        Extended attribute shared library
ii  libbz2-1.0             1.0.5-1           high-quality block-sorting file co
ii  libc6                  2.9-12            GNU C Library: Shared libraries
ii  libdar64-4             2.3.8-3           Disk ARchive: Shared library
ii  libgcc1                1:4.4.0-5         GCC support library
ii  libssl0.9.8            0.9.8g-15+lenny1  SSL shared libraries
ii  libstdc++6             4.4.0-5           The GNU Standard C++ Library v3
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

dar recommends no packages.

Versions of packages dar suggests:
ii  dar-docs                      2.3.9-1    Disk ARchive: Backup directory tre
ii  par2                          0.4-10     Parity Archive Volume Set, for che

-- no debconf information
--- dar-2.3.9.orig/src/libdar/mask_list.cpp
+++ dar-2.3.9/src/libdar/mask_list.cpp
@@ -147,7 +147,7 @@
 	    delete [] buffer;
 
 		// completing relative paths of the list
-	    if(prefix.is_relative())
+	    if(prefix.is_relative() && !prefix.is_subdir_of("<ROOT>", true))
 		throw Erange("mask_list::mask_list", gettext("Mask_list's prefix must be an absolute path"));
 	    else
 	    {
--- dar-2.3.9.orig/src/libdar/mask_list.hpp
+++ dar-2.3.9/src/libdar/mask_list.hpp
@@ -56,7 +56,9 @@
             /// \param[in] filename_list_st is the path to the file listing the
             /// filename to select for the operation
             /// \param[in] case_sensit whether comparison is case sensitive or not
-            /// \param[in] prefix add this (absolute) prefix to relative paths of the list
+            /// \param[in] prefix add this prefix to relative paths of the list. The 
+	    /// prefix should be either absolute, or <ROOT> (in case of operations 
+	    /// on an existing archive)
 	    /// \param[in] include whether the mask_list is used for file inclusion or file exclusion
         mask_list(const std::string & filename_list_st, bool case_sensit, const path & prefix, bool include);
 

Reply via email to