]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsCacheItem.cpp
whitespace only
[lyx.git] / src / graphics / GraphicsCacheItem.cpp
index 9fab10dbf9c4549363efcf780c10a87234b61f82..2e8c415f36b6709d849389281d2a084f6e031a64 100644 (file)
@@ -364,9 +364,10 @@ bool CacheItem::Impl::tryDisplayFormat(FileName & filename, string & from)
        if (zipped_) {
                string tempname = unzippedFileName(filename_.toFilesystemEncoding());
                string const ext = getExtension(tempname);
+               tempname = changeExtension(tempname, "") + "-XXXXXX";
                if (!ext.empty())
-                       tempname = changeExtension(tempname, "");
-               TempFile tempfile(tempname + "-XXXXXX." + ext);
+                       tempname = addExtension(tempname, ext);
+               TempFile tempfile(tempname);
                tempfile.setAutoRemove(false);
                unzipped_filename_ = tempfile.name();
                if (unzipped_filename_.empty()) {