Hi, On Sun, 23 Sep 2007, Lorenzo Campedelli wrote:
> While you are working on vvfat issues, could you give a look to the > attached small patch? Okay, this is what I would do: - not make this handling dependent on vvfat (but this means checking if the colon is the second character, because then it is most likely a Windows path and does _not_ want special handling), and - I'd use the result of strrchr() directly. This is a sketch of the code I propose: const char *tmp; ... get_tmp_filename(tmp_filename, sizeof(tmp_filename)); /* Handle 'fat:rw:<filename>' */ tmp = strrchr(backing_filename, ':'); if (tmp - backing_filename == 2) /* DOS path */ tmp = NULL; else if (tmp - backing_filename > 2 && tmp[-2] == ':') tmp -= 2; realpath(filename, tmp ? tmp : backing_filename); Ciao, Dscho