libobs: Don't call unlink unnecessarily

A file rename will automatically replace the old file if an older file
exists, and will do so automatically.  Unlinking is unnecessary, and may
have a chance of preventing that move operation from being atomic.
This commit is contained in:
jp9000 2017-05-04 18:19:46 -07:00
parent 08a94072a0
commit 85a6d16258

View file

@ -682,7 +682,6 @@ obs_data_t *obs_data_create_from_json_file_safe(const char *json_file,
/* delete current file if corrupt to prevent it from
* being backed up again */
os_unlink(json_file);
os_rename(backup_file.array, json_file);
file_data = obs_data_create_from_json_file(json_file);