Copy current path to buffer