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.
This commit is contained in:
Aziz Berkay Yesilyurt 2021-07-09 01:05:35 +02:00 committed by Andreas Kling
parent f62f53f723
commit ec389adaa6

View file

@ -10,6 +10,7 @@
#include <AK/MappedFile.h>
#include <AK/StringBuilder.h>
#include <LibCore/DirIterator.h>
#include <LibCore/File.h>
#include <LibCore/Timer.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/Painter.h>
@ -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();
}