[platform] updater temp. directory sanity check (EA-96629)

This commit is contained in:
Roman Shevchenko
2017-02-21 18:08:48 +01:00
parent fc2835ef9a
commit 87f52f3149
@@ -111,6 +111,9 @@ object UpdateInstaller {
val jnaUtils = findLib("jna-platform.jar")
val tempDir = getTempDir()
if (FileUtil.isAncestor(PathManager.getHomePath(), tempDir.path, true)) {
throw IOException("Temp directory inside installation: $tempDir")
}
if (!(tempDir.exists() || tempDir.mkdirs())) {
throw IOException("Cannot create temp directory: $tempDir")
}