return(realpath_ret(NULL, cwd));
}
- *(temp++) = '\0';
- (void) strcpy(buf, temp);
-
- /* if the last '/' is the first char in new we need to preserve it */
- if (new[0] == '\0') {
- new[0] = '/';
- new[1] = '\0';
- }
+ (void) strcpy(buf, ++temp);
+ *temp = '\0';
/*
* chdir() to new and go a getcwd() to find real path then
return(realpath_ret(NULL, cwd));
}
- *(temp++) = '\0';
- (void) strcpy(buf, temp);
-
- /* if the last '/' is the first char in new we need to preserve it */
- if (new[0] == '\0') {
- new[0] = '/';
- new[1] = '\0';
- }
+ (void) strcpy(buf, ++temp);
+ *temp = '\0';
/*
* chdir() to new and go a getcwd() to find real path then