2010/12/19 Gtk MailingList <gtkmailinglistgree...@googlemail.com>:
> In this little program i try to replace all spaces in the string with "\ ".
> Because if you use a space character in a path on the command line it
> doesn't work. You must always use "/home/user/some\ directory/second\
> directory" instead of "/home/user/some directory/second directory". Maybe
> you have an better idea to solve this problem.

Use g_spawn_sync() / g_spawn_async() instead of system() to execute
the command line program. The g_spawn family of functions takes a list
of program arguments instead of a command line, so you don't need to
escape any special characters.

Regards, Krzysztof
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to