unused variable warning fix (patch 923094)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a3a363f61b
commit
844ca09641
@ -751,17 +751,22 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin
|
||||
#endif
|
||||
|
||||
// Handle User's home (ignore root homes!)
|
||||
size_t len = 0;
|
||||
if ((val = wxGetUserHome (user)) != NULL &&
|
||||
(len = wxStrlen(val)) > 2 &&
|
||||
wxStrncmp(dest, val, len) == 0)
|
||||
{
|
||||
wxStrcpy(wxFileFunctionsBuffer, wxT("~"));
|
||||
if (user != wxT(""))
|
||||
wxStrcat(wxFileFunctionsBuffer, (const wxChar*) user);
|
||||
wxStrcat(wxFileFunctionsBuffer, dest + len);
|
||||
wxStrcpy (dest, wxFileFunctionsBuffer);
|
||||
}
|
||||
val = wxGetUserHome (user);
|
||||
if (!val)
|
||||
return dest;
|
||||
|
||||
const size_t len = wxStrlen(val);
|
||||
if (len <= 2)
|
||||
return dest;
|
||||
|
||||
if (wxStrncmp(dest, val, len) == 0)
|
||||
{
|
||||
wxStrcpy(wxFileFunctionsBuffer, wxT("~"));
|
||||
if (user != wxT(""))
|
||||
wxStrcat(wxFileFunctionsBuffer, (const wxChar*) user);
|
||||
wxStrcat(wxFileFunctionsBuffer, dest + len);
|
||||
wxStrcpy (dest, wxFileFunctionsBuffer);
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user