Re: Strange Error with Glib::ustring



Thank you for the fast and professional help. And thank you for the tips. I'm going to take a look at Glib::spawn_async and i  should implement a while loop. 


Greesce






Am 19.12.2010 um 20:38 schrieb Krzysztof Kosiński <tweenk pl gmail com>:

2010/12/19 Gtk MailingList <gtkmailinglistgreesce 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]