Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Write access exception on test generating in Idea project with JDK 11 #…
  • Loading branch information
Vassiliy-Kudryashov committed Jul 5, 2022
commit 151ee55ff440db19e212e9e3e5d1f7b2683b01cd
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ fun ContentEntry.addSourceRootIfAbsent(
model.dispose()
return
}
VfsUtil.createDirectoryIfMissing(VfsUtilCore.urlToPath(sourceRootUrl))
addSourceFolder(sourceRootUrl, type)
WriteCommandAction.runWriteCommandAction(rootModel.module.project) {
try {
VfsUtil.createDirectoryIfMissing(VfsUtilCore.urlToPath(sourceRootUrl))
addSourceFolder(sourceRootUrl, type)
model.commit()
} catch (e: Exception) {
logger.error { e }
Expand Down