diff --git a/include/strings.cpp b/include/strings.cpp index c0eb89dc2..ef7defc79 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -1297,12 +1297,15 @@ bool TFilename::custom_path(const char* path_list) if (!is_absolute_path()) { TToken_string pl = path_list; - if (pl.empty_items()) + if (pl.empty()) { - pl = firm2dir(prefix().get_codditta()); - pl << SLASH << "custom"; - pl.add(firm2dir(-1)); - pl << "custom"; + if (prefix_valid()) + { + pl = firm2dir(prefix().get_codditta()); + pl << SLASH << "custom"; + pl.add(firm2dir(-1)); + pl << "custom"; + } pl.add("custom"); } const TString fname = name();