From b2294c5603312ff44d5fe2c3b4c7d6f8e908d80d Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 19 Jun 2019 14:42:34 +0200 Subject: Simplify piping through Inkscape. Reduce code duplication. --- src/io/file-export-cmd.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/io/file-export-cmd.cpp') diff --git a/src/io/file-export-cmd.cpp b/src/io/file-export-cmd.cpp index 1582a94ad..42363985d 100644 --- a/src/io/file-export-cmd.cpp +++ b/src/io/file-export-cmd.cpp @@ -150,6 +150,11 @@ InkFileExportCmd::get_filename_out(std::string filename_in, std::string object_i return export_filename; } + // Check for pipe + if (filename_in == "-") { + return "-"; + } + // Construct output filename from input filename and export_type. auto extension_pos = filename_in.find_last_of('.'); if (extension_pos == std::string::npos) { -- cgit v1.2.3