This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 10/10] Reserve paths starting "." for package metadata
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Tue, 2 Aug 2016 16:30:37 +0100
- Subject: [PATCH setup 10/10] Reserve paths starting "." for package metadata
- Authentication-results: sourceware.org; auth=none
- References: <20160802153037.125216-1-jon.turney@dronecode.org.uk>
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