ExpandUNCFileName returns no result
Original Reporter info from Mantis: Moombas
-
Reporter name: Moombas
Original Reporter info from Mantis: Moombas
- Reporter name: Moombas
Description:
The function
function ExpandUNCFileName (const filename:unicodestring) : unicodestring;
...
if rc = NO_ERROR then
Result := PRemoteNameInfoW(buf)^.lpUniversalName
else if rc = ERROR_NOT_CONNECTED then
Result := filename
else
Result := '';
...
doesn't return a result if "rc" is not "ERROR_NOT_CONNECTED" and not "NO_ERROR ".
Steps to reproduce:
Call the function like:
path := ExpandUNCFileName('\1.1.1.1\c$');
path will be empty and make problems when used later.
ExpandUNCFileName should turn back the filename or an error (on which you can check) instead.
Mantis conversion info:
- Mantis ID: 36129
- OS Build: Windows 7 64Bit
- Version: 2.0.4