mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-79029: Create .iml file in a right place.
`newModule` accepts path to `iml` file, not a project path GitOrigin-RevId: dde210b8411fef7d9073f409282f9f4ce68216d8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
47d10fa87c
commit
e6d9aba8e9
@@ -47,6 +47,7 @@ import java.nio.file.FileAlreadyExistsException
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.createDirectories
|
||||
import kotlin.io.path.createFile
|
||||
import kotlin.io.path.name
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
|
||||
private val logger = fileLogger()
|
||||
@@ -244,7 +245,7 @@ private suspend fun openProject(projectPath: Path): Project {
|
||||
// There are countless number of reasons `openProjectAsync` might return null
|
||||
if (project.modules.isEmpty()) {
|
||||
writeAction {
|
||||
ModuleManager.getInstance(project).newModule(projectPath, PythonModuleTypeBase.getInstance().id)
|
||||
ModuleManager.getInstance(project).newModule(projectPath.resolve("${projectPath.name}.iml"), PythonModuleTypeBase.getInstance().id)
|
||||
}
|
||||
}
|
||||
return project
|
||||
|
||||
Reference in New Issue
Block a user