Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
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
Show 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)
...
@@ -577,11 +577,15 @@ static int SaveConfigFile (vlc_object_t *p_this)
clearerr
(
file
);
clearerr
(
file
);
goto
error
;
goto
error
;
}
}
#if !defined( WIN32 ) && !defined( __OS2__ )
#if defined(__APPLE__) || defined(__ANDROID__)
#if defined(__APPLE__) || defined(__ANDROID__)
fsync
(
fd
);
/* Flush from OS */
fsync
(
fd
);
/* Flush from OS */
#else
#else
fdatasync
(
fd
);
/* Flush from OS */
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
#endif
/* Atomically replace the file... */
/* Atomically replace the file... */
if
(
vlc_rename
(
temporary
,
permanent
))
if
(
vlc_rename
(
temporary
,
permanent
))
...
@@ -589,14 +593,8 @@ static int SaveConfigFile (vlc_object_t *p_this)
...
@@ -589,14 +593,8 @@ static int SaveConfigFile (vlc_object_t *p_this)
/* (...then synchronize the directory, err, TODO...) */
/* (...then synchronize the directory, err, TODO...) */
/* ...and finally close the file */
/* ...and finally close the file */
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
#
endif
#
if !defined (WIN32) && !defined (__OS2__)
fclose
(
file
);
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
#endif
free
(
temporary
);
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