Don't attempt to go back if on the relative root

This commit is contained in:
lostd 2014-10-23 17:39:39 +03:00
parent 8d4019f3aa
commit 9407399230

View file

@ -658,7 +658,9 @@ nochange:
return; return;
case SEL_BACK: case SEL_BACK:
/* There is no going back */ /* There is no going back */
if (strcmp(path, "/") == 0) if (strcmp(path, "/") == 0 ||
strcmp(path, ".") == 0 ||
strchr(path, '/') == NULL)
goto nochange; goto nochange;
if (canopendir(path) == 0) { if (canopendir(path) == 0) {
printwarn(); printwarn();