Replace old hack in wxFileName::Assign() with better solution

Replace the workaround introduced as a "temporary fix to avoid breaking
backwards compatibility in 2.8" back in 9e1c7236e0 (don't treat foo in
c:\\foo\bar as network share, 2006-12-17) with a better solution
proposed in the comment in that commit, i.e. don't even try to extract
the volume from the path if we already have the volume separately.

This commit is best viewed ignoring whitespace-only changes.
This commit is contained in:
Vadim Zeitlin
2021-09-15 00:35:34 +01:00
parent abf26b03a7
commit 7e4b54a00a
2 changed files with 38 additions and 29 deletions

View File

@@ -626,6 +626,17 @@ private:
// check whether this dir is valid for Append/Prepend/InsertDir()
static bool IsValidDirComponent(const wxString& dir);
// flags used with DoSetPath()
enum
{
SetPath_PathOnly = 0,
SetPath_MayHaveVolume = 1
};
// helper of public SetPath() also used internally
void DoSetPath(const wxString& path, wxPathFormat format,
int flags = SetPath_MayHaveVolume);
// the drive/volume/device specification (always empty for Unix)
wxString m_volume;