From cc5f574db52ce80453bd873de5d2bcd57053d4ba Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 23 Feb 2015 11:37:02 -0300 Subject: [PATCH] filename_formatter: Replace "{path}" with "." if the path is empty (fix #591) --- src/app/filename_formatter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/filename_formatter.cpp b/src/app/filename_formatter.cpp index 028beb0ea..7d088e366 100644 --- a/src/app/filename_formatter.cpp +++ b/src/app/filename_formatter.cpp @@ -36,9 +36,13 @@ std::string filename_formatter( const std::string& layerName, int frame, bool replaceFrame) { + std::string path = base::get_file_path(filename); + if (path.empty()) + path = "."; + std::string output = format; base::replace_string(output, "{fullname}", filename); - base::replace_string(output, "{path}", base::get_file_path(filename)); + base::replace_string(output, "{path}", path); base::replace_string(output, "{name}", base::get_file_name(filename)); base::replace_string(output, "{title}", base::get_file_title(filename)); base::replace_string(output, "{extension}", base::get_file_extension(filename));