DataSourceStorage — do not use Project.DIRECTORY_STORE_FOLDER

This commit is contained in:
Vladimir Krivosheev
2016-09-20 13:16:45 +02:00
parent 604fe247a0
commit 2d772e7448
2 changed files with 6 additions and 6 deletions
@@ -231,12 +231,9 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo
return FileUtil.isAncestor(PathUtilRt.getParentPath(projectFilePath), filePath, false)
}
override fun getDirectoryStoreFile(): VirtualFile? {
if (!isDirectoryBased) {
return null
}
return PathUtilRt.getParentPath(projectFilePath).nullize()?.let { LocalFileSystem.getInstance().findFileByPath(it) }
}
override fun getDirectoryStorePath() = if (!isDirectoryBased) null else PathUtilRt.getParentPath(projectFilePath).nullize()
override fun getDirectoryStoreFile() = directoryStorePath?.let { LocalFileSystem.getInstance().findFileByPath(it) }
}
private open class ProjectStoreImpl(project: ProjectImpl, private val pathMacroManager: PathMacroManager) : ProjectStoreBase(project) {
@@ -58,4 +58,7 @@ public interface IProjectStore extends IComponentStore {
@Nullable
VirtualFile getDirectoryStoreFile();
@Nullable
String getDirectoryStorePath();
}