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
18632c2b
Commit
18632c2b
authored
Feb 22, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
itss: Fix opening streams with back slashes.
parent
e716c5b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
storage.c
dlls/itss/storage.c
+13
-5
No files found.
dlls/itss/storage.c
View file @
18632c2b
...
@@ -329,7 +329,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_OpenStream(
...
@@ -329,7 +329,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_OpenStream(
DWORD
len
;
DWORD
len
;
struct
chmUnitInfo
ui
;
struct
chmUnitInfo
ui
;
int
r
;
int
r
;
WCHAR
*
path
;
WCHAR
*
path
,
*
p
;
TRACE
(
"%p %s %p %u %u %p
\n
"
,
This
,
debugstr_w
(
pwcsName
),
TRACE
(
"%p %s %p %u %u %p
\n
"
,
This
,
debugstr_w
(
pwcsName
),
reserved1
,
grfMode
,
reserved2
,
ppstm
);
reserved1
,
grfMode
,
reserved2
,
ppstm
);
...
@@ -337,21 +337,29 @@ static HRESULT WINAPI ITSS_IStorageImpl_OpenStream(
...
@@ -337,21 +337,29 @@ static HRESULT WINAPI ITSS_IStorageImpl_OpenStream(
len
=
strlenW
(
This
->
dir
)
+
strlenW
(
pwcsName
)
+
1
;
len
=
strlenW
(
This
->
dir
)
+
strlenW
(
pwcsName
)
+
1
;
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
strcpyW
(
path
,
This
->
dir
);
strcpyW
(
path
,
This
->
dir
);
if
(
pwcsName
[
0
]
==
'/'
)
if
(
pwcsName
[
0
]
==
'/'
||
pwcsName
[
0
]
==
'\\'
)
{
{
WCHAR
*
p
=
&
path
[
strlenW
(
path
)
-
1
];
p
=
&
path
[
strlenW
(
path
)
-
1
];
while
(
(
path
<=
p
)
&&
(
*
p
==
'/'
)
)
while
(
(
path
<=
p
)
&&
(
*
p
==
'/'
)
)
*
p
--
=
0
;
*
p
--
=
0
;
}
}
strcatW
(
path
,
pwcsName
);
strcatW
(
path
,
pwcsName
);
for
(
p
=
path
;
*
p
;
p
++
)
{
if
(
*
p
==
'\\'
)
*
p
=
'/'
;
}
TRACE
(
"Resolving %s
\n
"
,
debugstr_w
(
path
));
TRACE
(
"Resolving %s
\n
"
,
debugstr_w
(
path
));
r
=
chm_resolve_object
(
This
->
chmfile
,
path
,
&
ui
);
r
=
chm_resolve_object
(
This
->
chmfile
,
path
,
&
ui
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
if
(
r
!=
CHM_RESOLVE_SUCCESS
)
if
(
r
!=
CHM_RESOLVE_SUCCESS
)
{
WARN
(
"Could not resolve object
\n
"
);
return
STG_E_FILENOTFOUND
;
return
STG_E_FILENOTFOUND
;
}
stm
=
ITSS_create_stream
(
This
,
&
ui
);
stm
=
ITSS_create_stream
(
This
,
&
ui
);
if
(
!
stm
)
if
(
!
stm
)
...
@@ -660,7 +668,7 @@ static HRESULT WINAPI ITSS_IStream_Read(
...
@@ -660,7 +668,7 @@ static HRESULT WINAPI ITSS_IStream_Read(
This
->
addr
+=
count
;
This
->
addr
+=
count
;
if
(
pcbRead
)
if
(
pcbRead
)
*
pcbRead
=
count
;
*
pcbRead
=
count
;
return
count
?
S_OK
:
S_FALSE
;
return
count
?
S_OK
:
S_FALSE
;
}
}
...
...
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