All relative paths of symbolic links should be resolved from the directory where the link is located. The current working directory does not affect the resolution of the path. A symbolic link can be absolute or relative, and may or may not have a leading dot. Directory content example:
file
symlink -> file
Copying of the directory with such content does not work currently. When copying symlink, Copy returns an error because the file does not exist in the current working directory. In the existing tests, there is a symbolic link named "symlink" that points to a file named "README.md". However, when resolving the path of the file, the file is located in the repository's root directory, not the test case directory, and copying of these dirs work fine.
The solution is to check whether the resolved path is absolute or not. If it is not, append it to the file's directory path.
All relative paths of symbolic links should be resolved from the directory where the link is located. The current working directory does not affect the resolution of the path. A symbolic link can be absolute or relative, and may or may not have a leading dot. Directory content example:
Copying of the directory with such content does not work currently. When copying
symlink
,Copy
returns an error because thefile
does not exist in the current working directory. In the existing tests, there is a symbolic link named "symlink" that points to a file named "README.md". However, when resolving the path of the file, the file is located in the repository's root directory, not the test case directory, and copying of these dirs work fine.The solution is to check whether the resolved path is absolute or not. If it is not, append it to the file's directory path.