def _adjust_cwd(self, path):
if type(path) is str:<EOL><INDENT>path = path.encode('<STR_LIT:utf-8>')<EOL><DEDENT>if self._cwd is None:<EOL><INDENT>return path<EOL><DEDENT>if (len(path) > <NUM_LIT:0>) and (path[<NUM_LIT:0>] == '<STR_LIT:/>'):<EOL><INDENT>return path<EOL><DEDENT>if self._cwd == '<STR_LIT:/>':<EOL><INDENT>return self._cwd + path<EOL><DEDENT>return self._cwd + '<STR_LIT:/>' + path<EOL>
Return an adjusted path if we're emulating a "current working
directory" for the server.