mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files. * Moved symlink check logic * Moved symlink check logic * Fixed prev commit --------- Co-authored-by: Daniel Shala <danielshala00@gmail.com>
This commit is contained in:
parent
11ecff2ff0
commit
5c89e22bb9
1 changed files with 7 additions and 4 deletions
|
@ -116,11 +116,13 @@ namespace Ryujinx.Ui.App.Common
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string extension = Path.GetExtension(app).ToLower();
|
var fileInfo = new FileInfo(app);
|
||||||
|
string extension = fileInfo.Extension.ToLower();
|
||||||
|
|
||||||
if (!File.GetAttributes(app).HasFlag(FileAttributes.Hidden) && extension is ".nsp" or ".pfs0" or ".xci" or ".nca" or ".nro" or ".nso")
|
if (!fileInfo.Attributes.HasFlag(FileAttributes.Hidden) && extension is ".nsp" or ".pfs0" or ".xci" or ".nca" or ".nro" or ".nso")
|
||||||
{
|
{
|
||||||
applications.Add(app);
|
var fullPath = fileInfo.ResolveLinkTarget(true)?.FullName ?? fileInfo.FullName;
|
||||||
|
applications.Add(fullPath);
|
||||||
numApplicationsFound++;
|
numApplicationsFound++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -905,3 +907,4 @@ namespace Ryujinx.Ui.App.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue