View Issue Details

IDProjectCategoryView StatusLast Update
0001786Far ManagerPanelpublic2011-12-23 13:02
ReporterMaximusAssigned Tovskirdin 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.0 
Target VersionFixed in Version3.0 
Summary0001786: Проблемы подключения к сетевым дискам
Description1. GetNameAndPassword использует для поля ввода логина "общую" историю, что приводит неприятным эффектам. Например, к подстановке в поле левого значения по умолчанию.
2. ConnectToNetworkDrive глючит, если GetStoredUserName вернула пустую строку. Попытка подключения к ресурсу без пароля занимает лишнее время и все-равно обламывается (да еще и конфликт прав может вызвать)
TagsNo tags attached.
Build2059

Relationships

duplicate of 0001518 closed Проблемы переподключения к "Disconnected" диску 

Activities

Maximus

2011-05-28 13:32

reporter  

110528.diff (1,811 bytes)
Index: network.cpp
===================================================================
--- network.cpp	(revision 6300)
+++ network.cpp	(working copy)
@@ -115,7 +115,7 @@
 	netResource.lpLocalName = (wchar_t *)NewDir;
 	netResource.lpRemoteName = (wchar_t *)strRemoteName.CPtr();
 	netResource.lpProvider = 0;
-	DWORD res = WNetAddConnection2(&netResource, 0, strUserName, 0);
+	DWORD res = strUserName.IsEmpty() ? ERROR_SESSION_CREDENTIAL_CONFLICT : WNetAddConnection2(&netResource, 0, strUserName, 0);
 
 	if (res == ERROR_SESSION_CREDENTIAL_CONFLICT)
 		res = WNetAddConnection2(&netResource, 0, 0, 0);
Index: stddlg.cpp
===================================================================
--- stddlg.cpp	(revision 6300)
+++ stddlg.cpp	(working copy)
@@ -601,6 +601,7 @@
 int WINAPI GetNameAndPassword(const wchar_t *Title, string &strUserName, string &strPassword,const wchar_t *HelpTopic,DWORD Flags)
 {
 	static string strLastName, strLastPassword;
+	const wchar_t *HistoryName=L"NetworkUser";	
 	int ExitCode;
 	/*
 	  0         1         2         3         4         5         6         7
@@ -620,7 +621,7 @@
 	{
 		{DI_DOUBLEBOX,  3, 1,72, 8,0,nullptr,nullptr,0,NullToEmpty(Title)},
 		{DI_TEXT,       5, 2, 0, 2,0,nullptr,nullptr,0,MSG(MNetUserName)},
-		{DI_EDIT,       5, 3,70, 3,0,nullptr,nullptr,DIF_FOCUS|DIF_USELASTHISTORY|DIF_HISTORY,(Flags&GNP_USELAST)?strLastName:strUserName},
+		{DI_EDIT,       5, 3,70, 3,0,HistoryName,nullptr,DIF_FOCUS|DIF_USELASTHISTORY|DIF_HISTORY,(Flags&GNP_USELAST)?strLastName:strUserName},
 		{DI_TEXT,       5, 4, 0, 4,0,nullptr,nullptr,0,MSG(MNetUserPassword)},
 		{DI_PSWEDIT,    5, 5,70, 5,0,nullptr,nullptr,0,(Flags&GNP_USELAST)?strLastPassword:strPassword},
 		{DI_TEXT,       3, 6, 0, 6,0,nullptr,nullptr,DIF_SEPARATOR,L""},
110528.diff (1,811 bytes)

vskirdin

2011-05-28 15:20

administrator   bugnote:0007102

build 2059

Issue History

Date Modified Username Field Change
2011-05-28 13:32 Maximus New Issue
2011-05-28 13:32 Maximus File Added: 110528.diff
2011-05-28 15:20 vskirdin Note Added: 0007102
2011-05-28 15:20 vskirdin Assigned To => vskirdin
2011-05-28 15:20 vskirdin Status new => feedback
2011-12-23 13:02 alexy Build => 2059
2011-12-23 13:02 alexy Status feedback => closed
2011-12-23 13:02 alexy Resolution open => fixed
2011-12-23 13:02 alexy Fixed in Version => 3.0
2012-12-14 23:31 DrKnS Relationship added duplicate of 0001518