From 3398ddffd1f68182af768ef4ea519e9a9ad4efaf Mon Sep 17 00:00:00 2001 From: Ben Jolly Date: Wed, 24 Nov 2021 04:24:27 +1300 Subject: [PATCH] fix: Issue #1253 (problems editing Jupyter Notebooks) (#1255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix bug introduced by LocalSourceFile paths * Use get_path_or_uri from SourceFile. Co-authored-by: Johannes Köster --- snakemake/script.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/snakemake/script.py b/snakemake/script.py index bb5d7af33..695cdbba0 100644 --- a/snakemake/script.py +++ b/snakemake/script.py @@ -393,10 +393,8 @@ def evaluate(self, edit=False): @property def local_path(self): - path = self.path[7:] - if not os.path.isabs(path): - return smart_join(self.basedir, path) - return path + assert self.is_local + return self.path.get_path_or_uri() @abstractmethod def get_preamble(self):