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
601b4fa5
Commit
601b4fa5
authored
Mar 06, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Mar 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Decrement file use count when deleting a cache entry.
parent
6e713b39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
urlcache.c
dlls/wininet/urlcache.c
+32
-0
No files found.
dlls/wininet/urlcache.c
View file @
601b4fa5
...
...
@@ -2924,6 +2924,7 @@ BOOL WINAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName)
LPURLCACHE_HEADER
pHeader
;
struct
_HASH_ENTRY
*
pHashEntry
;
CACHEFILE_ENTRY
*
pEntry
;
const
URL_CACHEFILE_ENTRY
*
pUrlEntry
;
DWORD
error
;
TRACE
(
"(%s)
\n
"
,
debugstr_a
(
lpszUrlName
));
...
...
@@ -2954,6 +2955,21 @@ BOOL WINAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName)
}
pEntry
=
(
CACHEFILE_ENTRY
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
dwOffsetEntry
);
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
FIXME
(
"Trying to delete entry of unknown format %s
\n
"
,
debugstr_an
((
LPCSTR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
pUrlEntry
=
(
const
URL_CACHEFILE_ENTRY
*
)
pEntry
;
if
(
pUrlEntry
->
CacheDir
<
pHeader
->
DirectoryCount
)
{
if
(
pHeader
->
directory_data
[
pUrlEntry
->
CacheDir
].
dwNumFiles
)
pHeader
->
directory_data
[
pUrlEntry
->
CacheDir
].
dwNumFiles
--
;
}
URLCache_DeleteEntry
(
pHeader
,
pEntry
);
URLCache_DeleteEntryFromHash
(
pHashEntry
);
...
...
@@ -2973,6 +2989,7 @@ BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName)
LPURLCACHE_HEADER
pHeader
;
struct
_HASH_ENTRY
*
pHashEntry
;
CACHEFILE_ENTRY
*
pEntry
;
const
URL_CACHEFILE_ENTRY
*
pUrlEntry
;
LPSTR
urlA
;
DWORD
error
;
...
...
@@ -3017,6 +3034,21 @@ BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName)
}
pEntry
=
(
CACHEFILE_ENTRY
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
dwOffsetEntry
);
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
FIXME
(
"Trying to delete entry of unknown format %s
\n
"
,
debugstr_an
((
LPCSTR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
pUrlEntry
=
(
const
URL_CACHEFILE_ENTRY
*
)
pEntry
;
if
(
pUrlEntry
->
CacheDir
<
pHeader
->
DirectoryCount
)
{
if
(
pHeader
->
directory_data
[
pUrlEntry
->
CacheDir
].
dwNumFiles
)
pHeader
->
directory_data
[
pUrlEntry
->
CacheDir
].
dwNumFiles
--
;
}
URLCache_DeleteEntry
(
pHeader
,
pEntry
);
URLCache_DeleteEntryFromHash
(
pHashEntry
);
...
...
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