[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with output file on windows
From: |
michel |
Subject: |
Re: Problem with output file on windows |
Date: |
Fri, 17 Jul 2009 01:08:19 -0300 |
User-agent: |
RoundCube Webmail/0.2 |
> This looks like a reasonable approach. I will push a similar fix
> to pre0.6.2 soon. I won't have a chance to test it on Windows,
> so please let me know if it works. (It will be in pre5 also.)
I don't understand this:
... || strchr ("/\\", home_dir[strlen (home_dir) - 1]) != NULL)
path = xasprintf ("%s%c", home_dir, '/');
'strchr' will return != NULL only if the last char on home_dir is either
'/' or '\'. So the '/' will be put on 'path' only if there is alread one
there and it should be the oposite. Am I missing something?
And since home_dir is being created with windows variables, there is no
chance
of it contains a slash, since windows only uses backslashs. Therefore, you
could
change 'strchr ("/\\", home_dir[strlen (home_dir) - 1]) != NULL' by
home_dir[strlen (home_dir) - 1]) == '\'.