summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp
index 6f162bfab94..2150cf31f79 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp
@@ -2,7 +2,7 @@
** FilePath.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2019 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2020 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -191,14 +191,16 @@ string FilePath::suffix () const {
/** Changes the suffix of the filename. If FilePath represents the
- * location of a directory (and not of a file) nothing happens.
- * @param[in] s new suffix */
-void FilePath::suffix (const string &s) {
+ * location of a directory (and not of a file) nothing happens. An
+ * empty new suffix leads to the removal of the current one.
+ * @param[in] newSuffix the new suffix */
+void FilePath::suffix (const string &newSuffix) {
if (!_fname.empty()) {
string current_suffix = suffix();
if (!current_suffix.empty())
_fname.erase(_fname.length()-current_suffix.length()-1);
- _fname += "."+s;
+ if (!newSuffix.empty())
+ _fname += "."+newSuffix;
}
}