Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 908c426

Browse files
author
schinagl
committed
Merge branch 'ms/master' into unc_path_support
# Conflicts: # src/wfcopy.c
2 parents 0ce202f + 6587002 commit 908c426

9 files changed

Lines changed: 75 additions & 30 deletions

File tree

build/Winfile.props

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,42 @@
1111
<GenerateDebugInformation>true</GenerateDebugInformation>
1212
</Link>
1313
</ItemDefinitionGroup>
14-
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='DebugXPStatic'">
14+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
1515
<ClCompile>
1616
<Optimization>Disabled</Optimization>
1717
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
18-
<RuntimeLibrary Condition="'$(Configuration)'=='Debug'">MultiThreadedDebugDLL</RuntimeLibrary>
19-
<RuntimeLibrary Condition="'$(Configuration)'=='DebugXPStatic'">MultiThreadedDebug</RuntimeLibrary>
20-
<EnableEnhancedInstructionSet Condition="'$(Configuration)'=='DebugXPStatic'">NoExtensions</EnableEnhancedInstructionSet>
18+
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
19+
<SdlCheck>true</SdlCheck>
2120
</ClCompile>
2221
</ItemDefinitionGroup>
23-
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='ReleaseXPStatic'">
22+
<ItemDefinitionGroup Condition="'$(Configuration)'=='DebugXPStatic'">
23+
<ClCompile>
24+
<Optimization>Disabled</Optimization>
25+
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
26+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
27+
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
28+
</ClCompile>
29+
</ItemDefinitionGroup>
30+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
2431
<ClCompile>
2532
<Optimization>MaxSpeed</Optimization>
2633
<FunctionLevelLinking>true</FunctionLevelLinking>
2734
<IntrinsicFunctions>true</IntrinsicFunctions>
28-
<RuntimeLibrary Condition="'$(Configuration)'=='Release'">MultiThreadedDLL</RuntimeLibrary>
29-
<RuntimeLibrary Condition="'$(Configuration)'=='ReleaseXPStatic'">MultiThreaded</RuntimeLibrary>
30-
<EnableEnhancedInstructionSet Condition="'$(Configuration)'=='ReleaseXPStatic'">NoExtensions</EnableEnhancedInstructionSet>
31-
<Optimization Condition="'$(Configuration)'=='ReleaseXPStatic'">MinSpace</Optimization>
35+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
36+
<SdlCheck>true</SdlCheck>
37+
</ClCompile>
38+
<Link>
39+
<OptimizeReferences>true</OptimizeReferences>
40+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
41+
</Link>
42+
</ItemDefinitionGroup>
43+
<ItemDefinitionGroup Condition="'$(Configuration)'=='ReleaseXPStatic'">
44+
<ClCompile>
45+
<Optimization>MinSpace</Optimization>
46+
<FunctionLevelLinking>true</FunctionLevelLinking>
47+
<IntrinsicFunctions>true</IntrinsicFunctions>
48+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
49+
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
3250
</ClCompile>
3351
<Link>
3452
<OptimizeReferences>true</OptimizeReferences>

nuget/winfile.nuspec

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,26 @@
77
<authors>Microsoft, WinFile OSS Contributors</authors>
88
<owners>https://github.com/craigwi</owners>
99
<requireLicenseAcceptance>false</requireLicenseAcceptance>
10+
<bugTrackerUrl>https://github.com/Microsoft/winfile/issues</bugTrackerUrl>
11+
<iconUrl>https://github.com/Microsoft/winfile/blob/master/winfile.png</iconUrl>
1012
<licenseUrl>https://github.com/Microsoft/winfile/raw/master/LICENSE</licenseUrl>
13+
<projectSourceUrl>https://github.com/Microsoft/winfile</projectSourceUrl>
1114
<projectUrl>https://github.com/Microsoft/winfile</projectUrl>
12-
<iconUrl>https://github.com/Microsoft/winfile/blob/master/winfile.png</iconUrl>
13-
<description>Windows File Manager (WinFile) was originally released with Windows 3.0 in the early 1990s. You can read more about the history at https://en.wikipedia.org/wiki/File_Manager_(Windows).</description>
15+
<releaseNotes>https://github.com/Microsoft/winfile/releases</releaseNotes>
16+
<description>Windows File Manager (WinFile) was originally released with Windows 3.0 in the early 1990s. You can read more about the history at https://en.wikipedia.org/wiki/Windows_File_Manager.</description>
1417
<summary>WinFile is the predecessor to the Windows Explorer and now runs on modern Windows, including Windows 10.</summary>
1518
<copyright>Copyright (c) Microsoft Corporation. All rights reserved.</copyright>
16-
<tags>file manager utilities tools</tags>
19+
<tags>file manager utilities tools</tags>
1720
<dependencies>
18-
<dependency id='vcredist140' />
21+
<dependency id='vcredist140' version='14.38.33135' />
1922
</dependencies>
2023
</metadata>
2124
<files>
2225
<file src="LICENSE.txt" target="legal\LICENSE.txt" />
2326
<file src="VERIFICATION.txt" target="legal\VERIFICATION.txt" />
2427
<file src="x86\Winfile.exe" target="tools\x86\Winfile.exe" />
2528
<file src="x86\Winfile.pdb" target="tools\x86\Winfile.pdb" />
26-
<file src="help\winfile.chm" target="tools\x86\winfile.chm" />
29+
<file src="help\winfile.chm" target="tools\x86\winfile.chm" />
2730
<file src="x64\Winfile.exe" target="tools\x64\Winfile.exe" />
2831
<file src="x64\Winfile.pdb" target="tools\x64\Winfile.pdb" />
2932
<file src="arm64\Winfile.exe" target="tools\arm64\Winfile.exe" />

src/treectl.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -616,19 +616,19 @@ ReadDirLevel(
616616
LPTSTR szAutoExpand,
617617
BOOL bPartialSort)
618618
{
619-
LPWSTR szEndPath;
619+
LPWSTR szEndPath;
620620
LFNDTA lfndta;
621621
INT iNode;
622622
BOOL bFound;
623-
PDNODE pNode;
623+
PDNODE pNode;
624624
BOOL bAutoExpand;
625625
BOOL bResult = TRUE;
626626
DWORD dwView;
627627
HWND hwndParent;
628628
HWND hwndDir;
629629
LPXDTALINK lpStart;
630-
LPXDTA* plpxdta;
631-
LPXDTA lpxdta;
630+
LPXDTA* plpxdta;
631+
LPXDTA lpxdta;
632632
INT count;
633633

634634
UINT uYieldCount = 0;
@@ -649,6 +649,8 @@ ReadDirLevel(
649649
//
650650

651651
lpStart = NULL;
652+
plpxdta = NULL;
653+
lpxdta = NULL;
652654

653655
if (!(dwView & VIEW_PLUSES)) {
654656

@@ -1035,6 +1037,8 @@ StealTreeData(
10351037
DWORD dwView;
10361038
DWORD dwAttribs;
10371039

1040+
hwndT = NULL;
1041+
10381042
//
10391043
// we need to match on these attributes as well as the name
10401044
//
@@ -1160,6 +1164,7 @@ FillTreeListbox(HWND hwndTC,
11601164
BOOL bPartialSort;
11611165
DRIVE drive;
11621166

1167+
pNode = NULL;
11631168

11641169
hwndLB = GetDlgItem(hwndTC, IDCW_TREELISTBOX);
11651170

@@ -1240,7 +1245,9 @@ FillTreeListbox(HWND hwndTC,
12401245
FindItemFromPath(hwndLB, szDefaultDir, FALSE, NULL, &pNode);
12411246
}
12421247

1243-
SendMessage(hwndLB, LB_SELECTSTRING, (WPARAM)-1, (LPARAM)pNode);
1248+
if (pNode != NULL) {
1249+
SendMessage(hwndLB, LB_SELECTSTRING, (WPARAM)-1, (LPARAM)pNode);
1250+
}
12441251

12451252
UpdateStatus(GetParent(hwndTC)); // Redraw the Status Bar
12461253

@@ -3203,6 +3210,7 @@ TreeControlWndProc(
32033210
BOOL bDir;
32043211
BOOL bChangeDisplay = FALSE;
32053212

3213+
hwndNext = NULL;
32063214
TypeAheadString('\0', NULL);
32073215
GetTreeWindows(hwndParent, NULL, &hwndDir);
32083216

@@ -3240,7 +3248,7 @@ TreeControlWndProc(
32403248
}
32413249
else
32423250
{
3243-
hwndSet = hwnd;
3251+
hwndSet = hwnd;
32443252
}
32453253
}
32463254
}

src/wfassoc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,6 +1783,9 @@ ClassesRead(HKEY hKey,
17831783

17841784
iKey = 0;
17851785

1786+
pFileType = NULL;
1787+
pExt = NULL;
1788+
17861789
pFileTypePrev = *ppFileTypeBase;
17871790
pExtPrev = *ppExtBase;
17881791

src/wfcopy.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ JAPANEND
473473

474474
} else {
475475

476-
LPSTR pOrigA;
476+
LPSTR pOrigA = NULL;
477477
CHAR szOrigA[11 * 2];
478478
if (bJAPAN) {
479479
if (!WideCharToMultiByte(CP_ACP,
@@ -1403,6 +1403,7 @@ GetNextPair(PCOPYROOT pcr, LPTSTR pFrom,
14031403
STKCHK();
14041404
*pFrom = CHAR_NULL;
14051405
*pdwError = 0 ;
1406+
pDTA = NULL;
14061407

14071408
//
14081409
// Keep recursing directory structure until we get to the bottom
@@ -2224,7 +2225,7 @@ WFMoveCopyDriverThread(LPVOID lpParameter)
22242225
{
22252226
PCOPYINFO pCopyInfo = lpParameter;
22262227
DWORD ret = 0; // Return value from WFMoveCopyDriver
2227-
LPWSTR pSpec; // Pointer to file spec
2228+
LPWSTR pSpec = NULL; // Pointer to file spec
22282229
DWORD dwAttr; // File attributes
22292230
DWORD dwResponse; // Response from ConfirmDialog call
22302231
DWORD oper = 0; // Disk operation being performed
@@ -2235,7 +2236,7 @@ WFMoveCopyDriverThread(LPVOID lpParameter)
22352236

22362237
TCHAR szSource[MAXPATHLEN]; // Source file (ANSI string)
22372238
LFNDTA DTADest; // DTA block for reporting dest errors
2238-
PLFNDTA pDTA; // DTA pointer for source errors
2239+
PLFNDTA pDTA = NULL; // DTA pointer for source errors
22392240
PCOPYROOT pcr; // Structure for searching source tree
22402241
BOOL bReplaceAll = FALSE; // Replace all flag
22412242
BOOL bSubtreeDelAll = FALSE; // Delete entire subtree flag

src/wfdir.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,8 @@ ChangeDisplay(
13181318

13191319
case WM_CREATE:
13201320

1321+
lpStart = NULL;
1322+
13211323
//
13221324
// dwNewView, dwNewSort and dwNewAttribs define the viewing
13231325
// parameters of the new window (GLOBALS)

src/wfdrives.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ DrivesWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
757757
BOOL bDir;
758758
BOOL bChangeDisplay = FALSE;
759759

760+
hwndNext = NULL;
761+
760762
GetTreeWindows(hwndChild, &hwndTree, &hwndDir);
761763

762764
// Check to see if we can change to the directory window

src/wfinfo.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,8 @@ UpdateDriveListWorker(VOID)
10801080

10811081
INT iUpdatePhantom = iUpdateReal ^ 1;
10821082

1083+
hEnum = NULL;
1084+
10831085

10841086
//
10851087
// GetLogicalDrives simply calls GetDriveType,
@@ -1334,11 +1336,13 @@ UpdateDriveListWorker(VOID)
13341336
rgiDriveReal[iUpdatePhantom][i] = 0;
13351337
}
13361338

1337-
if (bOpenEnumSucceed)
1339+
if (bOpenEnumSucceed) {
13381340
WNetCloseEnum(hEnum);
1341+
}
13391342

1340-
if (pcBuf)
1343+
if (pcBuf) {
13411344
LocalFree((HANDLE)pcBuf);
1345+
}
13421346

13431347

13441348
PostMessage(hwndFrame, FS_UPDATEDRIVETYPECOMPLETE, (WPARAM)cRealDrives, 0L);

src/wfutil.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,11 @@ SetDlgDirectory(HWND hDlg, LPTSTR pszPath)
11241124
HWND hDlgItem;
11251125
HANDLE hFont;
11261126
HANDLE hFontBak;
1127-
TCHAR szPath[MAXPATHLEN+5];
1128-
TCHAR szTemp[MAXPATHLEN+20];
1129-
TCHAR szMessage[MAXMESSAGELEN];
1127+
TCHAR szPath[MAXPATHLEN+5];
1128+
TCHAR szTemp[MAXPATHLEN+20];
1129+
TCHAR szMessage[MAXMESSAGELEN];
1130+
1131+
hFontBak = NULL;
11301132

11311133
if (pszPath)
11321134
lstrcpy(szPath, pszPath);
@@ -1145,14 +1147,16 @@ SetDlgDirectory(HWND hDlg, LPTSTR pszPath)
11451147
// This is required because Japanese Windows uses System font
11461148
// for dialog box
11471149
//
1148-
if (hFont)
1150+
if (hFont) {
11491151
hFontBak = SelectObject(hDC, hFont);
1152+
}
11501153

11511154
GetTextExtentPoint32(hDC, szMessage, lstrlen(szMessage), &size);
11521155
CompactPath(hDC, szPath, (rc.right-rc.left-size.cx));
11531156

1154-
if (hFont)
1157+
if (hFont) {
11551158
SelectObject(hDC, hFontBak);
1159+
}
11561160

11571161
ReleaseDC(hDlg, hDC);
11581162
wsprintf(szTemp, szMessage, szPath);

0 commit comments

Comments
 (0)