def _file_path_fixup(self, path):
'''
We have a pseudo-cwd that we use to
base off all commands. This means we
need to figure out if a given path is relative,
absolute, or file relative and calculate against
the pseudo cwd.
This function takes in a given file path arguemnt
and performs the fixups.
'''
if (self._is_path_absolute(path)):
return path
elif (self._is_path_drive_relative(path)):
return self.cwd[:2] + path
else:
return ntpath.join(self.cwd + '\\', path)
评论列表
文章目录