##// END OF EJS Templates
Use link(2) when possible in nbconvert
David Wolever -
Show More
@@ -16,10 +16,10 b' Contains writer for writing nbconvert output to filesystem.'
16
16
17 import io
17 import io
18 import os
18 import os
19 import shutil
20 import glob
19 import glob
21
20
22 from IPython.utils.traitlets import Unicode
21 from IPython.utils.traitlets import Unicode
22 from IPython.utils.path import link_or_copy
23
23
24 from .base import WriterBase
24 from .base import WriterBase
25
25
@@ -90,7 +90,7 b' class FilesWriter(WriterBase):'
90
90
91 # Copy if destination is different.
91 # Copy if destination is different.
92 if not os.path.normpath(dest) == os.path.normpath(matching_filename):
92 if not os.path.normpath(dest) == os.path.normpath(matching_filename):
93 shutil.copyfile(matching_filename, dest)
93 link_or_copy(matching_filename, dest)
94
94
95 # Determine where to write conversion results.
95 # Determine where to write conversion results.
96 dest = notebook_name + '.' + output_extension
96 dest = notebook_name + '.' + output_extension
General Comments 0
You need to be logged in to leave comments. Login now