Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
591ec61d
Commit
591ec61d
authored
Feb 11, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addons: fsstorage: handle Win32 paths
parent
323d078c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
modules/misc/addons/fsstorage.c
modules/misc/addons/fsstorage.c
+19
-2
No files found.
modules/misc/addons/fsstorage.c
View file @
591ec61d
...
...
@@ -435,13 +435,21 @@ static int InstallAllFiles( addons_storage_t *p_this, const addon_entry_t *p_ent
if
(
strstr
(
p_file
->
psz_filename
,
".."
)
)
return
VLC_EGENERIC
;
char
*
psz_translated_filename
=
strdup
(
p_file
->
psz_filename
);
if
(
!
psz_translated_filename
)
return
VLC_ENOMEM
;
char
*
tmp
=
psz_translated_filename
;
while
(
*
tmp
++
)
if
(
*
tmp
==
'/'
)
*
tmp
=
DIR_SEP_CHAR
;
char
*
psz_dir
=
getAddonInstallDir
(
p_file
->
e_filetype
);
if
(
!
psz_dir
||
asprintf
(
&
psz_dest
,
"%s"
DIR_SEP
"%s"
,
psz_dir
,
p
_file
->
psz
_filename
)
<
1
)
p
sz_translated
_filename
)
<
1
)
{
free
(
psz_dir
);
free
(
psz_translated_filename
);
return
VLC_EGENERIC
;
}
free
(
psz_translated_filename
);
free
(
psz_dir
);
if
(
InstallFile
(
p_this
,
p_file
->
psz_download_uri
,
psz_dest
)
!=
VLC_SUCCESS
)
...
...
@@ -803,14 +811,23 @@ static int Remove( addons_storage_t *p_storage, addon_entry_t *p_entry )
case
ADDON_SKIN2
:
{
char
*
psz_dest
;
char
*
psz_translated_filename
=
strdup
(
p_file
->
psz_filename
);
if
(
!
psz_translated_filename
)
return
VLC_ENOMEM
;
char
*
tmp
=
psz_translated_filename
;
while
(
*
tmp
++
)
if
(
*
tmp
==
'/'
)
*
tmp
=
DIR_SEP_CHAR
;
char
*
psz_dir
=
getAddonInstallDir
(
p_file
->
e_filetype
);
if
(
!
psz_dir
||
asprintf
(
&
psz_dest
,
"%s"
DIR_SEP
"%s"
,
psz_dir
,
p
_file
->
psz
_filename
)
<
1
)
p
sz_translated
_filename
)
<
1
)
{
free
(
psz_dir
);
free
(
psz_translated_filename
);
return
VLC_EGENERIC
;
}
free
(
psz_dir
);
free
(
psz_translated_filename
);
vlc_unlink
(
psz_dest
);
msg_Dbg
(
p_storage
,
"removing %s"
,
psz_dest
);
...
...
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