Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0f81ac35
Commit
0f81ac35
authored
Jan 06, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole: Remove a no longer needed smbfs hack.
parent
860d682c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
42 deletions
+17
-42
stg_bigblockfile.c
dlls/ole32/stg_bigblockfile.c
+17
-42
No files found.
dlls/ole32/stg_bigblockfile.c
View file @
0f81ac35
...
...
@@ -422,49 +422,24 @@ void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
if
(
This
->
fileBased
)
{
char
buf
[
10
];
DWORD
w
;
LARGE_INTEGER
newpos
;
/*
* close file-mapping object, must be done before call to SetEndFile
*/
if
(
This
->
hfilemap
)
CloseHandle
(
This
->
hfilemap
);
This
->
hfilemap
=
0
;
/*
* BEGIN HACK
* This fixes a bug when saving through smbfs.
* smbmount a Windows shared directory, save a structured storage file
* to that dir: crash.
*
* The problem is that the SetFilePointer-SetEndOfFile combo below
* doesn't always succeed. The file is not grown. It seems like the
* operation is cached. By doing the WriteFile, the file is actually
* grown on disk.
* This hack is only needed when saving to smbfs.
*/
memset
(
buf
,
'0'
,
10
);
SetFilePointer
(
This
->
hfile
,
newSize
.
u
.
LowPart
,
NULL
,
FILE_BEGIN
);
WriteFile
(
This
->
hfile
,
buf
,
10
,
&
w
,
NULL
);
/*
* END HACK
*/
/*
* set the new end of file
*/
SetFilePointer
(
This
->
hfile
,
newSize
.
u
.
LowPart
,
NULL
,
FILE_BEGIN
);
SetEndOfFile
(
This
->
hfile
);
/*
* re-create the file mapping object
*/
This
->
hfilemap
=
CreateFileMappingA
(
This
->
hfile
,
NULL
,
This
->
flProtect
,
0
,
0
,
NULL
);
newpos
.
QuadPart
=
newSize
.
QuadPart
;
if
(
SetFilePointerEx
(
This
->
hfile
,
newpos
,
NULL
,
FILE_BEGIN
))
{
if
(
This
->
hfilemap
)
CloseHandle
(
This
->
hfilemap
);
SetEndOfFile
(
This
->
hfile
);
/*
* re-create the file mapping object
*/
This
->
hfilemap
=
CreateFileMappingA
(
This
->
hfile
,
NULL
,
This
->
flProtect
,
0
,
0
,
NULL
);
}
}
else
{
...
...
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