This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH setup 10/10] Reserve paths starting "." for package metadata


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]