remove hardcoded '/' from grammar source path (#1986)

pull/1996/head
Michael Davis 3 years ago committed by GitHub
parent 275c05008f
commit b03421a8c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,7 +143,8 @@ fn fetch_grammar(grammar: GrammarConfiguration) -> Result<()> {
} = grammar.source } = grammar.source
{ {
let grammar_dir = crate::runtime_dir() let grammar_dir = crate::runtime_dir()
.join("grammars/sources") .join("grammars")
.join("sources")
.join(&grammar.grammar_id); .join(&grammar.grammar_id);
fs::create_dir_all(&grammar_dir).context(format!( fs::create_dir_all(&grammar_dir).context(format!(
@ -233,7 +234,8 @@ fn build_grammar(grammar: GrammarConfiguration) -> Result<()> {
PathBuf::from(&path) PathBuf::from(&path)
} else { } else {
crate::runtime_dir() crate::runtime_dir()
.join("grammars/sources") .join("grammars")
.join("sources")
.join(&grammar.grammar_id) .join(&grammar.grammar_id)
}; };

Loading…
Cancel
Save