diff --git a/src/lay/lay/layApplication.cc b/src/lay/lay/layApplication.cc index b1c636cf8..bc54d25e9 100644 --- a/src/lay/lay/layApplication.cc +++ b/src/lay/lay/layApplication.cc @@ -560,7 +560,7 @@ Application::Application (int &argc, char **argv, bool non_ui_mode) } else if (a == "-j" && (i + 1) < argc) { - custom_macro_paths.push_back (std::pair (args [++i], "macros")); + custom_macro_paths.push_back (std::pair (args [++i], std::string ())); } else if (a == "-nt") { @@ -678,7 +678,7 @@ Application::Application (int &argc, char **argv, bool non_ui_mode) while (! ex.at_end ()) { std::string p; ex.read_word_or_quoted (p); - custom_macro_paths.push_back (std::pair (p, "macros")); + custom_macro_paths.push_back (std::pair (p, std::string ())); if (ex.test (":")) { ex.read_word (custom_macro_paths.back ().second); } diff --git a/src/lay/lay/layMacroController.cc b/src/lay/lay/layMacroController.cc index d6452d75f..52f83c029 100644 --- a/src/lay/lay/layMacroController.cc +++ b/src/lay/lay/layMacroController.cc @@ -68,7 +68,12 @@ MacroController::load () for (size_t c = 0; c < m_macro_categories.size (); ++c) { if (p->cat.empty () || p->cat == m_macro_categories [c].first) { - std::string mp = tl::to_string (QDir (tl::to_qstring (p->path)).absoluteFilePath (tl::to_qstring (m_macro_categories [c].first))); + std::string mp; + if (p->cat.empty ()) { + mp = tl::to_string (QDir (tl::to_qstring (p->path)).absoluteFilePath (tl::to_qstring (m_macro_categories [c].first))); + } else { + mp = p->path; + } lym::MacroCollection::root ().add_folder (p->description, mp, m_macro_categories [c].first, p->readonly); } }