-//printf("FileSystem::parse_directories 2 %s\n", current_dir);
- if(!strlen(current_dir))
- {
-// no current directory
- strcpy(string, new_dir);
- }
- else
- {
- snprintf(string, sizeof(string),
- is_root_dir(current_dir) ||
- current_dir[strlen(current_dir)-1] == '/' ?
-// current directory is root or already has ending /
- "%s%s" : "%s/%s",
- current_dir, new_dir);
- }
-
-//printf("FileSystem::parse_directories 3 %s %s\n", new_dir, string);
+ strcpy(string, current_dir);
+ add_end_slash(string);
+ strcat(string, new_dir);