Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
20bc2694
Commit
20bc2694
authored
Jun 18, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small simplification
parent
89593593
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
src/config/file.c
src/config/file.c
+6
-8
No files found.
src/config/file.c
View file @
20bc2694
...
...
@@ -577,11 +577,15 @@ static int SaveConfigFile (vlc_object_t *p_this)
clearerr
(
file
);
goto
error
;
}
#if !defined( WIN32 ) && !defined( __OS2__ )
#if defined(__APPLE__) || defined(__ANDROID__)
fsync
(
fd
);
/* Flush from OS */
#else
fdatasync
(
fd
);
/* Flush from OS */
#endif
#if defined (WIN32) || defined (__OS2__)
/* Windows cannot (re)move open files nor overwrite existing ones */
fclose
(
file
);
vlc_unlink
(
permanent
);
#endif
/* Atomically replace the file... */
if
(
vlc_rename
(
temporary
,
permanent
))
...
...
@@ -589,14 +593,8 @@ static int SaveConfigFile (vlc_object_t *p_this)
/* (...then synchronize the directory, err, TODO...) */
/* ...and finally close the file */
vlc_mutex_unlock
(
&
lock
);
#
endif
#
if !defined (WIN32) && !defined (__OS2__)
fclose
(
file
);
#if defined( WIN32 ) || defined( __OS2__ )
/* Windows cannot remove open files nor overwrite existing ones */
vlc_unlink
(
permanent
);
if
(
vlc_rename
(
temporary
,
permanent
))
vlc_unlink
(
temporary
);
vlc_mutex_unlock
(
&
lock
);
#endif
free
(
temporary
);
...
...
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