File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -795,12 +795,10 @@ void MainWindow::toggleAbsolutePaths( bool absolute )
795795 for (Engine & engine : engines)
796796 engine.path = pathHelper.convertPath ( engine.path );
797797
798- if (iwadListFromDir && !iwadDir.isEmpty ()) {
798+ if (iwadListFromDir && !iwadDir.isEmpty ())
799799 iwadDir = pathHelper.convertPath ( iwadDir );
800- } else {
801- for (IWAD & iwad : iwads)
802- iwad.path = pathHelper.convertPath ( iwad.path );
803- }
800+ for (IWAD & iwad : iwads)
801+ iwad.path = pathHelper.convertPath ( iwad.path );
804802
805803 mapDir = pathHelper.convertPath ( mapDir );
806804
Original file line number Diff line number Diff line change @@ -354,15 +354,11 @@ class PathHelper {
354354
355355 QString getAbsolutePath ( QString path ) const
356356 {
357- if (path.isEmpty ())
358- return {};
359- return QFileInfo ( _baseDir, path ).absoluteFilePath ();
357+ return path.isEmpty () ? " " : QFileInfo ( _baseDir, path ).absoluteFilePath ();
360358 }
361359 QString getRelativePath ( QString path ) const
362360 {
363- if (path.isEmpty ())
364- return {};
365- return _baseDir.relativeFilePath ( path );
361+ return path.isEmpty () ? " " : _baseDir.relativeFilePath ( path );
366362 }
367363 QString convertPath ( QString path ) const
368364 {
@@ -373,6 +369,8 @@ class PathHelper {
373369 {
374370 if (path.isEmpty ())
375371 return {};
372+ if (QDir::isAbsolutePath ( path ))
373+ return path;
376374 QString absPath = _currentDir.filePath ( path );
377375 return _baseDir.relativeFilePath ( absPath );
378376 }
You can’t perform that action at this time.
0 commit comments