From ec389adaa6ad802961e9bf091094f0e84f74b2d7 Mon Sep 17 00:00:00 2001 From: Aziz Berkay Yesilyurt Date: Fri, 9 Jul 2021 01:05:35 +0200 Subject: [PATCH] ImageViewer: Use real path for the image path By using the real path for the image, ImageViewer can iterate over the images in the same directory. Before, this was not possible when ImageViewer opened from Terminal with a path argument. --- Userland/Applications/ImageViewer/ViewWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/ImageViewer/ViewWidget.cpp b/Userland/Applications/ImageViewer/ViewWidget.cpp index c2382f96db..dc03eaca40 100644 --- a/Userland/Applications/ImageViewer/ViewWidget.cpp +++ b/Userland/Applications/ImageViewer/ViewWidget.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -267,7 +268,7 @@ void ViewWidget::load_from_file(const String& path) m_timer->stop(); } - m_path = path; + m_path = Core::File::real_path_for(path); m_scale = -1; reset_view(); }