diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-06-19 12:42:34 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-06-19 12:42:34 +0000 |
| commit | b2294c5603312ff44d5fe2c3b4c7d6f8e908d80d (patch) | |
| tree | b0fa7446c2039ddc1d09e20428d16568bfe294b2 /src/io | |
| parent | Restore ability to pipe a file into Inkscape. (diff) | |
| download | inkscape-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.cpp | 5 |
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) { |
