mirror of
https://github.com/mpv-player/mpv
synced 2024-12-14 19:05:33 +00:00
Use recorded last path only when stat it ok.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25327 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6e9b19642a
commit
af43903635
@ -413,7 +413,8 @@ static int open_fs(menu_t* menu, char* args) {
|
||||
if (path_fp >= 0) {
|
||||
if (!fstat (path_fp, &st) && (st.st_size > 0)) {
|
||||
path = malloc(st.st_size+1);
|
||||
if ((read(path_fp, path, st.st_size) == st.st_size) && path[0] != '\0'){
|
||||
if ((read(path_fp, path, st.st_size) == st.st_size) && path[0] == '/'
|
||||
&& !stat(path, &st) && S_ISDIR(st.st_mode)){
|
||||
freepath = path;
|
||||
path[st.st_size] = '\0';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user