git-svn-id: http://ltt.polymtl.ca/svn@460 04897980-b3bd-0310-b5e0-8ef037075253
[lttv.git] / ltt / branches / poly / ltt / tracefile.c
index 0af8976a170b4f6537f5139d63c4bb5e33950b67..2d2bba390df0a3c86ac920e26362137c76624b4f 100644 (file)
@@ -349,7 +349,8 @@ void getCpuFileInfo(LttTrace *t, char* cpu)
 
   while((entry = readdir(dir)) != NULL){
     if(strcmp(entry->d_name,".") != 0 &&
-       strcmp(entry->d_name,"..") != 0 ){
+       strcmp(entry->d_name,"..") != 0 &&
+       strcmp(entry->d_name,".svn") != 0){      
       strcpy(name,cpu);
       strcat(name,entry->d_name);
       ltt_tracefile_open_cpu(t,name);
@@ -365,6 +366,10 @@ void getCpuFileInfo(LttTrace *t, char* cpu)
  *
  *When a trace is closed, all the associated facilities, types and fields
  *are released as well.
+ *
+ * MD : If pathname is already absolute, we do not add current working
+ * directory to it.
+ *
  ****************************************************************************/
 
 void get_absolute_pathname(const char *pathname, char * abs_pathname)
@@ -372,11 +377,19 @@ void get_absolute_pathname(const char *pathname, char * abs_pathname)
   char * ptr, *ptr1;
   size_t size = DIR_NAME_SIZE;
   abs_pathname[0] = '\0';
+
+       if(pathname[0] == '/')
+       {
+    strcat(abs_pathname, pathname);
+               return;
+       }
+
   if(!getcwd(abs_pathname, size)){
     g_warning("Can not get current working directory\n");
     strcat(abs_pathname, pathname);
     return;
   }
+
   strcat(abs_pathname,"/");
   
   ptr = (char*)pathname;
This page took 0.023484 seconds and 4 git commands to generate.