You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/11/22 02:32:47 UTC
[commons-io] branch master updated: Fix Windows builds.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new cec461c Fix Windows builds.
cec461c is described below
commit cec461c2ec5352ae691611bef9757eb3e1dcec7a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 21 21:32:45 2021 -0500
Fix Windows builds.
---
src/main/java/org/apache/commons/io/file/PathUtils.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java b/src/main/java/org/apache/commons/io/file/PathUtils.java
index 13d304d..d30f4d2 100644
--- a/src/main/java/org/apache/commons/io/file/PathUtils.java
+++ b/src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -494,7 +494,7 @@ public final class PathUtils {
* @since 2.9.0
*/
public static PathCounters deleteFile(final Path file, final LinkOption[] linkOptions, final DeleteOption... deleteOptions)
- throws NoSuchFileException, IOException {
+ throws NoSuchFileException, IOException {
//
// TODO Needs clean up
//
@@ -1311,6 +1311,9 @@ public final class PathUtils {
} catch (final IOException e) {
// Retry with POSIX below.
}
+ if (!isPosix(path, linkOptions)) {
+ throw new IOException(String.format("DOS or POSIX file operations not available for '%s' %s", path, Arrays.toString(linkOptions)));
+ }
// POSIX
if (readOnly) {
// RO