mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-28 15:20:15 +00:00
Merge branch '1.0'
This commit is contained in:
commit
c813241601
@ -25,9 +25,13 @@ std::string filename_formatter(
|
|||||||
const std::string& layerName,
|
const std::string& layerName,
|
||||||
int frame, bool replaceFrame)
|
int frame, bool replaceFrame)
|
||||||
{
|
{
|
||||||
|
std::string path = base::get_file_path(filename);
|
||||||
|
if (path.empty())
|
||||||
|
path = ".";
|
||||||
|
|
||||||
std::string output = format;
|
std::string output = format;
|
||||||
base::replace_string(output, "{fullname}", filename);
|
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, "{name}", base::get_file_name(filename));
|
||||||
base::replace_string(output, "{title}", base::get_file_title(filename));
|
base::replace_string(output, "{title}", base::get_file_title(filename));
|
||||||
base::replace_string(output, "{extension}", base::get_file_extension(filename));
|
base::replace_string(output, "{extension}", base::get_file_extension(filename));
|
||||||
|
Loading…
Reference in New Issue
Block a user