Ignore:
Timestamp:
Jan 7, 2007, 10:36:11 PM (19 years ago)
Author:
cinc
Message:

More fixes for string and path classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/foundation/class_c/nomfilepath.c

    r181 r182  
    5757{
    5858  gchar*  chrTemp;
     59  PNOMPath np;
    5960
    6061  if(!nomPath)
    61     return (PNOMPath)NOMPath_copy(nomSelf, NULLHANDLE);
     62    return (PNOMPath)NOMPath_appendSeparator(nomSelf, NULLHANDLE);
    6263
    6364  if(0==NOMPath_length((NOMString*)nomPath, ev))
    6465    return NOMPath_appendSeparator(nomSelf, ev);
    6566
     67  chrTemp=NOMPath_queryCString(nomPath, NULLHANDLE);
    6668  if(G_DIR_SEPARATOR==chrTemp[0])
    67     NOMPath_stripSeparator(nomSelf, ev);
    68   else
    69     NOMPath_appendSeparator(nomSelf, ev); /* Make sure current path has a separator */
    70 
    71   return (NOMPath*) NOMPath_append((NOMString*) nomSelf, (NOMString*)nomPath, NULLHANDLE);
     69    np=NOMPath_stripSeparator(nomSelf, ev);
     70  else{
     71    np=NOMPath_appendSeparator(nomSelf, ev); /* Make sure current path has a separator */
     72  }
     73
     74  return (NOMPath*) NOMPath_append((NOMString*) np, (NOMString*)nomPath, NULLHANDLE);
    7275}
    7376
Note: See TracChangeset for help on using the changeset viewer.