History

configfiles: refactor mp_get_playback_resume_config_filename()

This avoids duplicating fname when it is a URL.

Guido Cella committed 1 year ago

Commit 0bb16591 parent a5fa8621 file · +3 −1Browse files

Unified · Split

player/configfiles.c+3−1
@@ -215,7 +215,9 @@ static char *mp_get_playback_resume_config_filename(struct MPContext *mpctx, · 214 unmodified lines
215 char *res = NULL;215 char *res = NULL;
216 void *tmp = talloc_new(NULL);216 void *tmp = talloc_new(NULL);
217 const char *path = NULL;217 const char *path = NULL;
218 if (opts->ignore_path_in_watch_later_config && !mp_is_url(bstr0(fname))) {218 if (mp_is_url(bstr0(fname))) {
219 path = fname;
220 } else if (opts->ignore_path_in_watch_later_config) {
219 path = mp_basename(fname);221 path = mp_basename(fname);
220 } else {222 } else {
221 path = mp_normalize_path(tmp, fname);223 path = mp_normalize_path(tmp, fname);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t