Skip to content

Commit

Permalink
finxing edge case where supposedely rel path is absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
palkh committed Jul 22, 2024
1 parent 41df946 commit d22348d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,11 @@ int mvlink(char* old_path,char* new_path)


dbg(3,"Getting absolute path of %s\n",new_link);
// allocate memory for the absolute path
char* new_link_abs = realpath(new_link,NULL);
if (new_link[0] != '/') {
// allocate memory for the absolute path
char* new_link_abs = realpath(new_link,NULL);
}


if (new_link_abs == NULL) {
msg(ERROR,"Error getting absolute path\n");
Expand Down

0 comments on commit d22348d

Please sign in to comment.