(file) Return to System.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/System.cpp between version 1.37 and 1.38

version 1.37, 2006/01/30 16:17:08 version 1.38, 2006/06/07 21:38:15
Line 185 
Line 185 
 char *System::extract_file_path(const char *fullpath, char *dirname) char *System::extract_file_path(const char *fullpath, char *dirname)
 { {
   char *p;   char *p;
   char buff[2048];    char buff[4096];
   if (fullpath == NULL)   if (fullpath == NULL)
     {     {
       dirname[0] = '\0';       dirname[0] = '\0';
       return dirname;       return dirname;
     }     }
   strcpy(buff, fullpath);    strncpy(buff, fullpath, sizeof(buff)-1);
     buff[sizeof(buff)-1] =  '\0';
   for(p = buff + strlen(buff); p >= buff; p--)   for(p = buff + strlen(buff); p >= buff; p--)
     {     {
       if (*p == '\\' || *p == '/')       if (*p == '\\' || *p == '/')


Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2