Skip to content

Commit 8b3defa

Browse files
Write access exception on test generating in Idea project with JDK 11 #350 (#409)
1 parent c02883c commit 8b3defa

File tree

1 file changed

+2
-2
lines changed
  • utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/utils

1 file changed

+2
-2
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/utils/ModuleUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ fun ContentEntry.addSourceRootIfAbsent(
223223
model.dispose()
224224
return
225225
}
226-
VfsUtil.createDirectoryIfMissing(VfsUtilCore.urlToPath(sourceRootUrl))
227-
addSourceFolder(sourceRootUrl, type)
228226
WriteCommandAction.runWriteCommandAction(rootModel.module.project) {
229227
try {
228+
VfsUtil.createDirectoryIfMissing(VfsUtilCore.urlToPath(sourceRootUrl))
229+
addSourceFolder(sourceRootUrl, type)
230230
model.commit()
231231
} catch (e: Exception) {
232232
logger.error { e }

0 commit comments

Comments
 (0)