Lines Matching refs:src_path
76 FileSpec::ResolveUsername (const char *src_path, char *dst_path, size_t dst_len)
78 if (src_path == NULL || src_path[0] == '\0')
87 // If there's no ~, then just copy src_path straight to dst_path (they may be the same string...)
88 if (src_path[0] != '~')
90 size_t len = strlen (src_path);
93 ::bcopy (src_path, dst_path, dst_len - 1);
97 ::bcopy (src_path, dst_path, len + 1);
102 const char *first_slash = ::strchr (src_path, '/');
108 user_name = src_path + 1;
113 size_t user_name_len = first_slash - src_path - 1;
114 ::memcpy (user_home, src_path + 1, user_name_len);
145 return ::snprintf (dst_path, dst_len, "%s", src_path);
185 FileSpec::Resolve (const char *src_path, char *dst_path, size_t dst_len)
187 if (src_path == NULL || src_path[0] == '\0')
190 // Glob if needed for ~/, otherwise copy in case src_path is same as dst_path...
193 if (src_path[0] == '~')
195 size_t return_count = ResolveUsername(src_path, unglobbed_path, sizeof(unglobbed_path));
198 // then just copy over the src_path.
200 ::snprintf (unglobbed_path, sizeof(unglobbed_path), "%s", src_path);
205 ::snprintf(unglobbed_path, sizeof(unglobbed_path), "%s", src_path);