Skip to content

Commit 7b342e7

Browse files
check if file exists first to fix #8113
1 parent fcb833e commit 7b342e7

File tree

1 file changed

+1
-1
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-resource-connector-lib/src/main/java/com/microsoft/azure/toolkit/intellij/connector/dotazure

1 file changed

+1
-1
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-resource-connector-lib/src/main/java/com/microsoft/azure/toolkit/intellij/connector/dotazure/AzureModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private String getDefaultProfileName() {
179179
if (Objects.nonNull(this.defaultProfile)) {
180180
return this.defaultProfile.getName();
181181
}
182-
if (Objects.isNull(this.profilesXmlFile) || this.profilesXmlFile.contentsToByteArray().length < 1) {
182+
if (Objects.isNull(this.profilesXmlFile) || !this.profilesXmlFile.exists() || this.profilesXmlFile.contentsToByteArray().length < 1) {
183183
return null;
184184
}
185185
final Element profilesEle = JDOMUtil.load(this.profilesXmlFile.toNioPath());

0 commit comments

Comments
 (0)