Skip to content
Snippets Groups Projects
Commit d75edc35 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

r8845@totoro: nickm | 2006-10-02 16:34:58 -0400

 Fix an XXXX: make path_is_relative work on windows even though we never use it there.


svn:r8577
parent 36adc7cd
No related branches found
No related tags found
No related merge requests found
......@@ -1534,13 +1534,18 @@ tor_listdir(const char *dirname)
return result;
}
/** Return true iff <b>filename</b> is a relative path. (XXXX doesn't work on
* windows.) */
/** Return true iff <b>filename</b> is a relative path. */
int
path_is_relative(const char *filename)
{
if (filename && filename[0] == '/')
return 0;
#ifdef MS_WINDOWS
else if (filename && filename[0] == '\\')
return 0;
else if (filename && strlen(filename)>3 && TOR_ISALPHA(filename[0]) &&
filename[1] == ':' && filename[2] == '\\')
#endif
else
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment