]> git.mdlowis.com Git - archive/afm.git/commitdiff
use getcwd instead of get_current_dir_name
authora bellenir <a@bellenir.com>
Sat, 26 Jul 2014 00:55:04 +0000 (00:55 +0000)
committera bellenir <a@bellenir.com>
Sat, 26 Jul 2014 00:55:04 +0000 (00:55 +0000)
source/screen.c

index 98ecd40ddcd748cd767625a93fe40f1e5cc7a1b0..0fa9f78cbbdf69e0d56a3ec24f08bd11f03aa5cc 100644 (file)
@@ -106,7 +106,7 @@ static void screen_place_windows(void) {
 static frame_t* screen_frame_new(void) {
     frame_t* p_frame = (frame_t*)mem_allocate(sizeof(frame_t),&screen_frame_free);
     p_frame->p_win = newwin(1, 1, 0, 0);
-    char* path = state_get_focused_frame() ? state_get_focused_frame()->workdir->path : get_current_dir_name();
+    char* path = state_get_focused_frame() ? state_get_focused_frame()->workdir->path : getcwd(NULL, 0);
     p_frame->workdir = workdir_new(path);
     return p_frame;
 }