[MSHARED-1176] Test case for NoSuchFileException while copying symbolic#110
[MSHARED-1176] Test case for NoSuchFileException while copying symbolic#110kwin wants to merge 3 commits intoapache:masterfrom
Conversation
|
@slawekjaranowski This depends on #109 being merged first otherwise the build breaks even before executing the unit test. Update: Done and rebased this PR. |
|
Without testing your PR, here is what I see on FreeBSD (FreeBSD bsd1srv.fritz.box 12.3-STABLE FreeBSD 12.3-STABLE GENERIC amd64) where and The symlink or its target does not exist. |
|
Yes, exactly. In this case the target does not (yet) exist. The question is how |
link with relative non-existing target
94fa38a to
da11090
Compare
|
I'll try to look into this this month. |
|
IMHO copy should also not fail in case the source symlink is broken (which it currently does) |
I agree with that. If source leads to nowhere then dest should do too. Fully valid with POSIX. |
source symlink file
I added another (failing) test case for this scenario in 8ff14a5 |
|
From my PoV, it should mimic |
src/test/java/org/apache/maven/shared/utils/io/FileUtilsTest.java
Outdated
Show resolved
Hide resolved
| tempFolder.newFolder( "destDirectory" ), | ||
| "toSymLink" | ||
| ); | ||
| // this creates a symlink in a new folder pointing to a non-existing relative target "./target.txt" |
| "toSymLink" | ||
| ); | ||
| // this creates a symlink in a new folder pointing to a non-existing relative target "./non-existing.txt" | ||
| FileUtils.copyFile( from.toFile(), to, null, (FileUtils.FilterWrapper[]) null ); |
|
Resolve #306 |
link with relative non-existing target