Cannot delete: D:\JetBrains\PyCharm Community Edition 2023.2.5\plugins\terminal\zsh\.zshenv

I got this every time, when I try to update PyCharm and I can`t install update. Full log file is very long, so I will put here part of that.

10/12 19:59:27 INFO  DeleteAction.doApply - Delete action. File: D:\JetBrains\PyCharm Community Edition 2023.2.5\plugins\terminal\zsh\.zshenv
10/12 19:59:27 INFO  DeleteAction.doApply - Delete: D:\JetBrains\PyCharm Community Edition 2023.2.5\plugins\terminal\zsh\.zshenv
10/12 19:59:27 ERROR Patch.apply - apply failed
java.io.IOException: Cannot delete: D:\JetBrains\PyCharm Community Edition 2023.2.5\plugins\terminal\zsh\.zshenv
    at com.intellij.updater.Utils.tryDelete(Utils.java:115)
    at com.intellij.updater.Utils.access$000(Utils.java:14)
    at com.intellij.updater.Utils$1.visitFile(Utils.java:71)
    at com.intellij.updater.Utils$1.visitFile(Utils.java:68)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2811)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
    at com.intellij.updater.Utils.delete(Utils.java:68)
    at com.intellij.updater.DeleteAction.doApply(DeleteAction.java:79)
    at com.intellij.updater.PatchAction.apply(PatchAction.java:242)
    at com.intellij.updater.Patch.lambda$apply$3(Patch.java:345)
    at com.intellij.updater.Patch.forEach(Patch.java:394)
    at com.intellij.updater.Patch.apply(Patch.java:336)
    at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:152)
    at com.intellij.updater.Runner.install(Runner.java:383)
    at com.intellij.updater.Runner._main(Runner.java:204)
    at com.intellij.updater.Runner.main(Runner.java:45)
Caused by: java.nio.file.AccessDeniedException: D:\JetBrains\PyCharm Community Edition 2023.2.5\plugins\terminal\zsh\.zshenv
    at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
    at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
    at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
    at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
    at java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
    at java.base/java.nio.file.Files.delete(Files.java:1152)
    at com.intellij.updater.Utils.tryDelete(Utils.java:89)
    ... 15 more

 Thx for help

0
1 comment
Looks like a file permission issue. Is drive D: a local drive? Are you able to delete the file manually?
0

Please sign in to leave a comment.