-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MSHARED-1176] Test case for NoSuchFileException while copying symbolic #110
base: master
Are you sure you want to change the base?
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directory, not folder
"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 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directory, not folder
link with relative non-existing target