Overview
Artifact ID: | 0a8e44b3febc9260040b35732754655396c6df00 |
---|---|
Ticket: | 995a864c5adf79456808d8f2bcd44c4959f46136
Editor command fails with spaces |
User & Date: | dmitry 2011-02-04 02:49:18 |
Changes
- comment changed to:
The fix for bug [8d073be8808beaa7b614b6d489e729dfb51ac114] only seems to have fixed the issue for the gdiff command. If editor contains spaces, executing it still fails. <verbatim> C:\Docs\Projects\01. Lean SDMC>fossil commit c:/Program Files/Vim/vim73/gvim.exe "C:/<snipped>/ci-comment-5 260D688DBC8.txt" 'c:/Program' is not recognized as an internal or external command, operable program or batch file. c:\Docs\Bin\fossil.exe: editor aborted </verbatim> Diff below fixes this, but a better solution would probably be to extend the portable_system command to cover all uses of fossil_system <verbatim> --- src/checkin.c +++ src/checkin.c @@ -442,11 +442,11 @@ #if defined(_WIN32) blob_add_cr(&text); #endif blob_write_to_file(&text, zFile); if( zEditor ){ - zCmd = mprintf("%s \"%s\"", zEditor, zFile); + zCmd = mprintf("\"%s\" \"%s\"", zEditor, zFile); printf("%s\n", zCmd); if( fossil_system(zCmd) ){ fossil_panic("editor aborted"); } blob_reset(&text); </verbatim>
- resolution changed to: "Open"