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
31d48b08
Commit
31d48b08
authored
Apr 03, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: report playlist export I/O errors (fixes #10087)
parent
11e571c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
src/playlist/loadsave.c
src/playlist/loadsave.c
+20
-17
No files found.
src/playlist/loadsave.c
View file @
31d48b08
...
...
@@ -45,7 +45,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
playlist_export_t
*
p_export
=
vlc_custom_create
(
p_playlist
,
sizeof
(
*
p_export
),
"playlist export"
);
if
(
!
p_export
)
if
(
unlikely
(
p_export
==
NULL
)
)
return
VLC_ENOMEM
;
msg_Dbg
(
p_export
,
"saving %s to file %s"
,
...
...
@@ -58,26 +58,29 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
p_export
->
psz_filename
=
psz_filename
;
p_export
->
p_file
=
vlc_fopen
(
psz_filename
,
"wt"
);
if
(
p_export
->
p_file
==
NULL
)
{
msg_Err
(
p_export
,
"could not create playlist file %s: %s"
,
psz_filename
,
vlc_strerror_c
(
errno
)
);
else
goto
out
;
}
module_t
*
p_module
;
/* And call the module ! All work is done now */
playlist_Lock
(
p_playlist
);
p_module
=
module_need
(
p_export
,
"playlist export"
,
psz_type
,
true
);
playlist_Unlock
(
p_playlist
);
if
(
p_module
!=
NULL
)
{
module_t
*
p_module
;
/* And call the module ! All work is done now */
playlist_Lock
(
p_playlist
);
p_module
=
module_need
(
p_export
,
"playlist export"
,
psz_type
,
true
);
playlist_Unlock
(
p_playlist
);
if
(
p_module
==
NULL
)
msg_Err
(
p_playlist
,
"could not export playlist"
);
else
{
module_unneed
(
p_export
,
p_module
);
module_unneed
(
p_export
,
p_module
);
if
(
!
ferror
(
p_export
->
p_file
)
)
ret
=
VLC_SUCCESS
;
}
fclose
(
p_export
->
p_file
);
}
}
else
msg_Err
(
p_playlist
,
"could not export playlist"
);
fclose
(
p_export
->
p_file
);
out:
vlc_object_release
(
p_export
);
return
ret
;
}
...
...
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