Skip to content

Commit 3633ed1

Browse files
committed
fix path existence
1 parent f155e02 commit 3633ed1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jupyter_sphinx/ast.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import json
5+
import pathlib
56

67
import docutils
78
from docutils.parsers.rst import Directive, directives
@@ -403,6 +404,8 @@ def run(self):
403404
output_dir = sphinx_abs_dir(self.env)
404405
download_file = self.target + ext
405406
reftarget=os.path.realpath(os.path.join(output_dir, download_file))
407+
# touch the path, so that it can be found by the download collector
408+
pathlib.Path(reftarget).touch()
406409
node = download_reference(self.rawtext, reftarget=reftarget)
407410
self.set_source_info(node)
408411
title = self.title if self.has_explicit_title else download_file

0 commit comments

Comments
 (0)