Don't define unused variable in !wxHAS_NATIVE_READLINK case

Also make it const because it can be.

No real changes.
This commit is contained in:
Vadim Zeitlin
2021-04-07 01:43:56 +02:00
parent ae902a88ef
commit e551549015

View File

@@ -1674,11 +1674,11 @@ bool wxFileName::GetShortcutTarget(const wxString& shortcutPath,
wxFileName wxFileName::ResolveLink()
{
wxString link = GetFullPath();
wxFileName linkTarget( *this );
// Only resolve links on platforms with readlink (e.g. Unix-like platforms)
#if defined(wxHAS_NATIVE_READLINK)
const wxString link = GetFullPath();
wxStructStat st;
// This means the link itself doesn't exist, so return an empty filename