View* view = win_view(EDIT);
if (!path) path = view->buffer.path;
if (!path) return;
- path = strdup(path);
+ path = realpath(path, NULL);
free(view->buffer.path);
view->buffer.path = path;
buf_save(&(view->buffer));
/* if we still have args left we're going to open it in this instance */
if (*argv) {
- view_init(win_view(EDIT), *argv);
- win_prop_set("TIDE_FILE", "file", *argv);
+ char* path = realpath(*argv, NULL);
+ view_init(win_view(EDIT), path);
+ win_prop_set("TIDE_FILE", "file", path);
}
/* now create the window and start the event loop */