Enlightenment CVS committal Author : handyande Project : e17 Module : apps/e_utils
Dir : e17/apps/e_utils/src/bin/e17setroot Modified Files: e17setroot.c Log Message: Fix segs if file is in pwd =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17setroot/e17setroot.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- e17setroot.c 24 Jan 2005 14:24:10 -0000 1.6 +++ e17setroot.c 24 Jan 2005 14:40:16 -0000 1.7 @@ -98,6 +98,8 @@ ptr=path; c=strrchr(ptr, '/'); + if (!c) + return "."; dir = malloc(strlen(path) + 1); while(ptr != c) { @@ -120,6 +122,8 @@ i = 0; ptr = path; c = strrchr(ptr, '/'); + if (!c) + return path; file = malloc(strlen(ptr) + 1); while(ptr != c) { ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs