summaryrefslogtreecommitdiffstats
path: root/src/io
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-06-19 12:42:34 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-06-19 12:42:34 +0000
commitb2294c5603312ff44d5fe2c3b4c7d6f8e908d80d (patch)
treeb0fa7446c2039ddc1d09e20428d16568bfe294b2 /src/io
parentRestore ability to pipe a file into Inkscape. (diff)
downloadinkscape-b2294c5603312ff44d5fe2c3b4c7d6f8e908d80d.tar.gz
inkscape-b2294c5603312ff44d5fe2c3b4c7d6f8e908d80d.zip
Simplify piping through Inkscape. Reduce code duplication.
Diffstat (limited to 'src/io')
-rw-r--r--src/io/file-export-cmd.cpp5
1 files changed, 5 insertions, 0 deletions
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) {