We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d346ef8 commit f237fd4Copy full SHA for f237fd4
plugin-maven/src/main/java/com/diffplug/spotless/maven/incremental/FileIndex.java
@@ -144,7 +144,14 @@ private void ensureParentDirExists() {
144
throw new IllegalStateException("Index file does not have a parent dir: " + indexFile);
145
}
146
try {
147
- Files.createDirectories(parentDir);
+ if (Files.exists(parentDir, LinkOption.NOFOLLOW_LINKS)) {
148
+ Path realPath = parentDir.toRealPath();
149
+ if (!Files.exists(realPath)) {
150
+ Files.createDirectories(realPath);
151
+ }
152
+ } else {
153
+ Files.createDirectories(parentDir);
154
155
} catch (IOException e) {
156
throw new UncheckedIOException("Unable to create parent directory for the index file: " + indexFile, e);
157
0 commit comments