/[ascend]/trunk/base/generic/general/ospath.c
ViewVC logotype

Diff of /trunk/base/generic/general/ospath.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1313 by johnpye, Sun Jan 7 07:54:06 2007 UTC revision 1314 by johnpye, Mon Mar 5 05:17:33 2007 UTC
# Line 642  struct FilePath *ospath_getparent(struct Line 642  struct FilePath *ospath_getparent(struct
642              STRCAT(sub,PATH_SEPARATOR_STR);              STRCAT(sub,PATH_SEPARATOR_STR);
643          }          }
644      }else{      }else{
645          E("NO PARENT DIR");          /* ie pos<fp->path */
646          return ospath_new_noclean(fp->path);          M("NO PARENT DIR");
647            if(fp->path[0]==PATH_SEPARATOR_CHAR){
648                E("NO PARENT DIR");
649                return ospath_new_noclean(fp->path);
650            }else{
651                M("RETURNING '.'");
652    #ifdef WINPATHS
653                /* eg 'c:bin' --> 'c:' */
654                STRCPY(sub,fp->drive);
655                return ospath_new_noclean(sub);
656    #else
657                /* eg 'bin' --> '.' */
658                return ospath_new_noclean(".");
659    #endif
660            }
661      }      }
662    
663      M("Creating 'sub'");      M("Creating 'sub'");

Legend:
Removed from v.1313  
changed lines
  Added in v.1314

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22