Skip to content

Commit 2295f7f

Browse files
fix: proper use of relpath to define symlink
1 parent e69267c commit 2295f7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

snakemake_storage_plugin_fs/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ def retrieve_object(self):
204204
f"Creating symlink for on-demand retrieval of {self.query_path}."
205205
)
206206
os.symlink(
207-
self.query_path,
207+
# we have to use os.path.relpath here because Path.relative_to
208+
# does not allow usage of paths that are in different directories.
209+
os.path.relpath(self.query_path, self.local_path().parent),
208210
self.local_path(),
209211
target_is_directory=self.query_path.is_dir(),
210212
)

0 commit comments

Comments
 (0)