fix prev/next when destination is a folder.