Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Commit 0c7e63c

Browse files
committed
Merge pull request #36 from denofevil/fix-non-absolute-path
check if file is on local filesystem
2 parents f40a720 + 6e71bd8 commit 0c7e63c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/org/editorconfig/configmanagement/CodeStyleManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void windowGainedFocus(WindowEvent e) {
6363
public void windowLostFocus(WindowEvent e) {}
6464

6565
private void applySettings(final VirtualFile file) {
66-
if (file != null) {
66+
if (file != null && file.isInLocalFileSystem()) {
6767
// Always drop any current temporary settings so that the defaults will be applied if
6868
// this is a non-editorconfig-managed file
6969
codeStyleSettingsManager.dropTemporarySettings();

src/org/editorconfig/configmanagement/EncodingManager.java

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public void beforeDocumentSaving(@NotNull Document document) {
5151
}
5252

5353
private void applySettings(VirtualFile file) {
54+
if (!file.isInLocalFileSystem()) return;
5455
// Prevent "setEncoding" calling "saveAll" from causing an endless loop
5556
isApplyingSettings = true;
5657
final String filePath = file.getCanonicalPath();

src/org/editorconfig/plugincomponents/SettingsProviderComponent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public List<OutPair> getOutPairs (String filePath) {
3232
return outPairs;
3333
}
3434
catch (EditorConfigException error) {
35-
LOG.error(error.getStackTrace());
35+
LOG.error(error);
3636
return new ArrayList<OutPair>();
3737
}
3838
}

0 commit comments

Comments
 (0)