[MPlayer-cvslog] r25327 - trunk/libmenu/menu_filesel.c
ulion
subversion at mplayerhq.hu
Sun Dec 9 08:50:37 CET 2007
Author: ulion
Date: Sun Dec 9 08:50:37 2007
New Revision: 25327
Log:
Use recorded last path only when stat it ok.
Modified:
trunk/libmenu/menu_filesel.c
Modified: trunk/libmenu/menu_filesel.c
==============================================================================
--- trunk/libmenu/menu_filesel.c (original)
+++ trunk/libmenu/menu_filesel.c Sun Dec 9 08:50:37 2007
@@ -413,7 +413,8 @@ static int open_fs(menu_t* menu, char* a
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';
}
More information about the MPlayer-cvslog
mailing list