mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
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:
parent
f62f53f723
commit
ec389adaa6
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue