Fix copy not following symlinks
This commit is contained in:
parent
385b958ac2
commit
30cf9bfc52
25
0001-Follow-symlinks-in-NioFiles.copy.patch
Normal file
25
0001-Follow-symlinks-in-NioFiles.copy.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 978fcb3b207d1b1a9895dadd40ba31c290c57918 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Simacek <msimacek@redhat.com>
|
||||||
|
Date: Wed, 11 Jul 2018 13:15:55 +0200
|
||||||
|
Subject: [PATCH] Follow symlinks in NioFiles.copy
|
||||||
|
|
||||||
|
---
|
||||||
|
src/main/java/org/codehaus/plexus/util/NioFiles.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/codehaus/plexus/util/NioFiles.java b/src/main/java/org/codehaus/plexus/util/NioFiles.java
|
||||||
|
index 2841978..50cdeb7 100644
|
||||||
|
--- a/src/main/java/org/codehaus/plexus/util/NioFiles.java
|
||||||
|
+++ b/src/main/java/org/codehaus/plexus/util/NioFiles.java
|
||||||
|
@@ -138,7 +138,7 @@ public static File copy( File source, File target )
|
||||||
|
throws IOException
|
||||||
|
{
|
||||||
|
Path copy = Files.copy( source.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING,
|
||||||
|
- StandardCopyOption.COPY_ATTRIBUTES, LinkOption.NOFOLLOW_LINKS );
|
||||||
|
+ StandardCopyOption.COPY_ATTRIBUTES );
|
||||||
|
return copy.toFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: plexus-utils
|
Name: plexus-utils
|
||||||
Version: 3.1.0
|
Version: 3.1.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Plexus Common Utilities
|
Summary: Plexus Common Utilities
|
||||||
# ASL 1.1: several files in src/main/java/org/codehaus/plexus/util/
|
# ASL 1.1: several files in src/main/java/org/codehaus/plexus/util/
|
||||||
# xpp: src/main/java/org/codehaus/plexus/util/xml/pull directory
|
# xpp: src/main/java/org/codehaus/plexus/util/xml/pull directory
|
||||||
@ -17,6 +17,9 @@ BuildArch: noarch
|
|||||||
Source0: https://github.com/codehaus-plexus/%{name}/archive/%{name}-%{version}.tar.gz
|
Source0: https://github.com/codehaus-plexus/%{name}/archive/%{name}-%{version}.tar.gz
|
||||||
Source1: http://apache.org/licenses/LICENSE-2.0.txt
|
Source1: http://apache.org/licenses/LICENSE-2.0.txt
|
||||||
|
|
||||||
|
# https://github.com/codehaus-plexus/plexus-utils/issues/45
|
||||||
|
Patch1: 0001-Follow-symlinks-in-NioFiles.copy.patch
|
||||||
|
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||||
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
|
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
|
||||||
@ -39,6 +42,8 @@ Javadoc for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{name}-%{version}
|
%setup -q -n %{name}-%{name}-%{version}
|
||||||
|
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%mvn_file : plexus/utils
|
%mvn_file : plexus/utils
|
||||||
@ -72,6 +77,9 @@ cp %{SOURCE1} .
|
|||||||
%doc NOTICE.txt LICENSE-2.0.txt
|
%doc NOTICE.txt LICENSE-2.0.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 11 2018 Michael Simacek <msimacek@redhat.com> - 3.1.0-2
|
||||||
|
- Fix copy not following symlinks
|
||||||
|
|
||||||
* Mon Jun 25 2018 Michael Simacek <msimacek@redhat.com> - 3.1.0-1
|
* Mon Jun 25 2018 Michael Simacek <msimacek@redhat.com> - 3.1.0-1
|
||||||
- Update to upstream version 3.1.0
|
- Update to upstream version 3.1.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user