Re: mailcap.win32
Munesato - NAK - Nakada <[email protected]> Sat, 22 Feb 2003 00:17:35 +0900
| Newsgroups | gmane.mail.sylpheed.claws.windows |
|---|---|
| Message-ID | <[email protected]> |
Hi Thorsten, On Fri, 21 Feb 2003 14:25:45 +0100 Thorsten Maerz <[email protected]> wrote: > The quotes are needed, if the -resulting- path contains spaces or tabs, > e.g. "c:\program files" has to be quoted, otherwise windows tries to run > a "c:\program.exe" or "c:\program.bat" with the parameter "files". I think that it can do, if you use GetShortPathName(). A sample (on Vanilla) is like this... --- Start of a sample --- gint execute_command_line(const gchar *cmdline, gboolean async) { gchar **argv; gint ret; #ifdef WIN32 int i; #endif argv = strsplit_with_quote(cmdline, " ", 0); #ifdef WIN32 for (i = 0; argv[i]; i++){ gchar buf[BUFSIZ]; if (GetShortPathName(argv[i], buf, sizeof(buf))){ g_free(argv[i]); argv[i] = g_strdup(buf); } w32_locale_from_utf8(&argv[i]); } #endif --- End of a sample --- Best Regards, -- Munesato Nakada (NAK) <[email protected]> ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge