tests fixed: don't throw assertion if project file doesn't exist

This commit is contained in:
nik
2014-12-26 16:22:24 +03:00
parent c7235c76c6
commit 623ed817c4
@@ -33,7 +33,6 @@ import com.intellij.openapi.fileTypes.ex.FileTypeManagerEx;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.ArrayUtil;
import com.intellij.util.SystemProperties;
import com.intellij.util.text.DateFormatUtil;
@@ -118,9 +117,7 @@ public class FileTemplateManagerImpl extends FileTemplateManager implements Pers
@NotNull
@Override
public String getTemplatesDir() {
VirtualFile file = project.getProjectFile();
assert file != null;
return new File(file.getParent().getCanonicalPath(), TEMPLATES_DIR).getPath();
return new File(project.getBasePath(), Project.DIRECTORY_STORE_FOLDER + "/" + TEMPLATES_DIR).getPath();
}
};
}