Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
83641ce6
Commit
83641ce6
authored
Jun 11, 2023
by
Vladislav Timonin
Committed by
Alexandre Julliard
Jun 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Show >4GB values in size columns of My Computer.
parent
c94bca9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+20
-16
No files found.
dlls/shell32/shfldr_mycomp.c
View file @
83641ce6
...
...
@@ -790,13 +790,12 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx (IShellFolder2 * iface,
return
E_NOTIMPL
;
}
/* FIXME: drive size >4GB is rolling over */
static
HRESULT
WINAPI
ISF_MyComputer_fnGetDetailsOf
(
IShellFolder2
*
iface
,
LPCITEMIDLIST
pidl
,
UINT
iColumn
,
SHELLDETAILS
*
psd
)
{
IMyComputerFolderImpl
*
This
=
impl_from_IShellFolder2
(
iface
);
char
szP
ath
[
MAX_PATH
];
ULARGE_INTEGER
ulB
ytes
;
WCHAR
p
ath
[
MAX_PATH
];
ULARGE_INTEGER
b
ytes
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%p %i %p)
\n
"
,
This
,
pidl
,
iColumn
,
psd
);
...
...
@@ -813,22 +812,27 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
switch
(
iColumn
)
{
case
2
:
/* total size */
if
(
_ILIsDrive
(
pidl
))
{
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
GetDiskFreeSpaceExA
(
szPath
,
NULL
,
&
ulBytes
,
NULL
);
StrFormatByteSizeA
(
ulBytes
.
u
.
LowPart
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
}
if
(
!
_ILIsDrive
(
pidl
))
break
;
_ILSimpleGetTextW
(
pidl
,
path
,
MAX_PATH
);
GetDiskFreeSpaceExW
(
path
,
NULL
,
&
bytes
,
NULL
);
psd
->
str
.
uType
=
STRRET_WSTR
;
psd
->
str
.
u
.
pOleStr
=
CoTaskMemAlloc
((
MAX_PATH
+
1
)
*
sizeof
(
WCHAR
));
StrFormatByteSizeW
(
bytes
.
QuadPart
,
psd
->
str
.
u
.
pOleStr
,
MAX_PATH
);
break
;
case
3
:
/* free size */
if
(
_ILIsDrive
(
pidl
))
{
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
GetDiskFreeSpaceExA
(
szPath
,
&
ulBytes
,
NULL
,
NULL
);
StrFormatByteSizeA
(
ulBytes
.
u
.
LowPart
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
}
break
;
if
(
!
_ILIsDrive
(
pidl
))
break
;
_ILSimpleGetTextW
(
pidl
,
path
,
MAX_PATH
);
GetDiskFreeSpaceExW
(
path
,
&
bytes
,
NULL
,
NULL
);
psd
->
str
.
uType
=
STRRET_WSTR
;
psd
->
str
.
u
.
pOleStr
=
CoTaskMemAlloc
((
MAX_PATH
+
1
)
*
sizeof
(
WCHAR
));
StrFormatByteSizeW
(
bytes
.
QuadPart
,
psd
->
str
.
u
.
pOleStr
,
MAX_PATH
);
break
;
default:
return
shellfolder_get_file_details
(
iface
,
pidl
,
mycomputer_header
,
iColumn
,
psd
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment