diff --git a/src/tex2lyx/Makefile.am b/src/tex2lyx/Makefile.am index 94e6c4d6b7..b0be0afd96 100644 --- a/src/tex2lyx/Makefile.am +++ b/src/tex2lyx/Makefile.am @@ -36,7 +36,7 @@ TEST_FILES = \ TESTS = test/runtests.py updatetests: tex2lyx - $(PYTHON) "$(srcdir)/test/runtests.py" ./tex2lyx ../../../lib/scripts "$(srcdir)/test" + $(PYTHON) "$(srcdir)/test/runtests.py" ./tex2lyx "$(top_srcdir)/lib/scripts" "$(srcdir)/test" LINKED_FILES = \ ../Author.cpp \ diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index 1abdecb2c9..7561774633 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -997,6 +997,16 @@ int main(int argc, char * argv[]) return EXIT_SUCCESS; } else { masterFilePathLyX = onlyPath(outfilename); + if (copy_files) { + FileName const path(masterFilePathLyX); + if (!path.isDirectory()) { + if (!path.createPath()) { + cerr << "Warning: Could not create directory for file `" + << masterFilePathLyX << "ยด." << endl; + return EXIT_FAILURE; + } + } + } if (roundtrip) { if (tex2tex(infilename, FileName(outfilename), default_encoding)) return EXIT_SUCCESS;