I'm not sure I understand.
So you are in
/foo/bar folder, but then you open the Open Directory dialog, you get
_/foo/bar_ in the edit box?
An otherwise correct path, but with additional white space characters at the beginning or at the end, is inserted in the Open Directory dialog. Such a path is not found although it is clearly defined. It is even very confusing because the white characters are not easy to see in the error message. It would be good to simply remove the white characters and accept it.