This won't work as posed - the t_path string is being modified after the MCStringRef is being created which means the modifications have no effect (MCStringCreateWithCString copies the string).