]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
Reserve paths starting "." for package metadata
authorJon Turney <jon.turney@dronecode.org.uk>
Tue, 2 Aug 2016 11:40:01 +0000 (12:40 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Wed, 3 Aug 2016 20:45:23 +0000 (21:45 +0100)
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

index f54acdc1856deb04999d097a7435c71a9090c5ec..8aad3a5ee9a48bb4d2bf44a8b8f6607f24059e15 100644 (file)
@@ -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;
This page took 0.032776 seconds and 5 git commands to generate.