+ /* Strip trailing slashes. */
+ while (path_nchars >= 2 &&
+ is_any_path_separator(path[path_nchars - 1]) &&
+ path[path_nchars - 2] != L':')
+ {
+ path[--path_nchars] = L'\0';
+ }
+
+ /* Update pattern prefix. */
+ if (params->config != NULL)
+ {
+ params->config->_prefix = TSTRDUP(path);
+ params->config->_prefix_num_tchars = path_nchars;
+ if (params->config->_prefix == NULL)
+ {
+ ret = WIMLIB_ERR_NOMEM;
+ goto out_free_path;
+ }
+ }
+