VfsUtilTest.testNotCanonicallyNamedChild under Linux

This commit is contained in:
Alexey Kudravtsev
2013-11-27 17:56:25 +04:00
parent 76896b91ea
commit 5b4f290c30
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@@ -116,7 +117,8 @@ public abstract class NewVirtualFileSystem extends VirtualFileSystem implements
}
public String getCanonicallyCasedName(@NotNull VirtualFile file) {
return file.getName();
// have to perform at least some canonicalization, e.g. remove multiple '///'
return new File(file.getPath()).getName();
}
/**