Reserve pathnames starting "." (i.e. dotfiles in the root directory) for
package metadata, so don't extract them.

There are no current uses of these pathnames
---
 install.cc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/install.cc b/install.cc
index f54acdc..8aad3a5 100644
--- a/install.cc
+++ b/install.cc
@@ -471,6 +471,15 @@ Installer::installOne (packagemeta &pkgm, const 
packageversion &ver,
   while ((fn = tarstream->next_file_name ()).size ())
     {
       std::string canonicalfn = prefixPath + fn;
+
+      // pathnames starting "." (i.e. dotfiles in the root directory) are
+      // reserved for package metadata.  Don't extract them.
+      if (fn[0] == '.')
+        {
+          tarstream->skip_file ();
+          continue;
+        }
+
       Progress.SetText3 (canonicalfn.c_str ());
       Log (LOG_BABBLE) << "Installing file " << prefixURL << prefixPath
           << fn << endLog;
-- 
2.8.3

Reply via email to