summaryrefslogtreecommitdiffhomepage
path: root/anim-crop-tool
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-09 17:41:26 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-09 17:41:26 +0100
commita97e2a90a4508dc7936f132aebcccc08fd3305b0 (patch)
tree866ab5e78a8a7f4d09ba329f49b917caf83e970c /anim-crop-tool
parent4643a85a171652a25eecfca5a7af4cf4ccb2d580 (diff)
loader, anim-crop-tool: workaround relative path usage
Diffstat (limited to 'anim-crop-tool')
-rw-r--r--anim-crop-tool/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/anim-crop-tool/main.cpp b/anim-crop-tool/main.cpp
index e4878480..4d0eca1e 100644
--- a/anim-crop-tool/main.cpp
+++ b/anim-crop-tool/main.cpp
@@ -4,6 +4,7 @@
#include "serialize/anim.hpp"
#include "compat/defs.hpp"
#include "compat/sysexits.hpp"
+#include "loader/loader.hpp"
#include <cerrno>
#include <cmath>
@@ -211,8 +212,8 @@ static std::tuple<options, Arguments, bool> parse_cmdline(int argc, const char*
else if (!args.value<StringView>("scale").isEmpty())
opts.scale = { { .r = {args.value<float>("scale")} } , anim_scale_type::ratio };
- opts.output_dir = args.value<StringView>("output");
- opts.input_file = args.value<StringView>("input");
+ opts.output_dir = Path::join(loader.startup_directory(), args.value<StringView>("output"));
+ opts.input_file = Path::join(loader.startup_directory(), args.value<StringView>("input"));
opts.input_dir = Path::split(opts.input_file).first();
if (opts.output_dir.isEmpty())