Enlightenment CVS committal Author : lordchaos Project : e17 Module : proto
Dir : e17/proto/entropy/src Modified Files: entropy_core.c Log Message: Added ability to add locations to structure parent =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/entropy_core.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- entropy_core.c 20 Oct 2005 08:45:54 -0000 1.1 +++ entropy_core.c 22 Oct 2005 06:00:57 -0000 1.2 @@ -894,13 +894,15 @@ entropy_generic_file* file = entropy_generic_file_new(); evfs_file_uri_path* uri_path = evfs_parse_uri(uri); + printf("Returned path '%s'\n", uri_path->files[0]->path); + /*Get the last "/", after this is the filename (or dir name, or whatever)*/ pos = rindex(uri_path->files[0]->path, '/'); strncpy(file->filename, pos+1, strlen(uri_path->files[0]->path)); *pos = '\0'; /*If length is 0, it must have been a '/', therefore make this the new path*/ - if (strlen(uri_path->files[0]->path)) { + if (strlen(pos+1)) { strncpy(file->path, uri_path->files[0]->path, strlen(uri_path->files[0]->path)); } else { strcpy(file->path, "/"); ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs