From ec82a32765ddf40510d0362726ce7f8c238af040 Mon Sep 17 00:00:00 2001 From: Da Shen Date: Sat, 7 Oct 2023 11:24:34 +0800 Subject: [PATCH] [41_2] Fix ps_load from ramdisc --- src/System/Files/image_files.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/System/Files/image_files.cpp b/src/System/Files/image_files.cpp index 0c9d7ae5af..d62eecdf2c 100644 --- a/src/System/Files/image_files.cpp +++ b/src/System/Files/image_files.cpp @@ -181,12 +181,14 @@ ps_load (url image, bool conv) { #endif string s = "", suf= suffix (image); - if (suf == "ps" || suf == "eps") - load_string (image, s, false); - else + if (suf == "ps" || suf == "eps") { + load_string (name, s, false); + } else { if (conv) s= image_to_psdoc (image); // call converters, then load resulting ps - - if (s == "") load_string ("$TEXMACS_PATH/misc/pixmaps/unknown.png", s, true); + } + + if (is_empty (s)) + load_string ("$TEXMACS_PATH/misc/pixmaps/unknown.png", s, true); return s; }