Update of /cvsroot/xine/xine-ui/src/xitk
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4828

Modified Files:
        file_browser.c 
Log Message:
All the time I suspected there's something missing in my previous commit ...


Index: file_browser.c
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/file_browser.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- file_browser.c      7 Feb 2007 00:57:52 -0000       1.65
+++ file_browser.c      8 Feb 2007 00:00:14 -0000       1.66
@@ -683,15 +683,19 @@
     }
   }
   
+  /* Following code relies on the fact that fb->current_dir has no trailing 
'/' */
   if((pdir = opendir(fb->current_dir)) == NULL) {
     char *p = strrchr(fb->current_dir, '/');
     
     xine_error(_("Unable to open directory '%s': %s."), 
-              (p) ? p + 1 : fb->current_dir, strerror(errno));
+              (p && *(p + 1)) ? p + 1 : fb->current_dir, strerror(errno));
     
     /* One step back if dir has a subdir component */
     if(p && *(p + 1)) {
-      *p = '\0';
+      if(p == fb->current_dir) /* we are in the root dir */
+       *(p + 1) = '\0';
+      else
+       *p = '\0';
 
       fb_update_origin(fb);
       fb_getdir(fb);


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog

Reply via email to