Skip to content

Commit

Permalink
Make a backup of the source file; accidents happen
Browse files Browse the repository at this point in the history
  • Loading branch information
tecosaur committed Oct 25, 2020
1 parent 554b189 commit f51f51e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions org-pandoc-import-transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ actions that may undesirably trigger the file watcher.")
(start-time (time-to-seconds (current-time)))
(org-pandoc-import-transient--currently-processing t))
(unless (plist-get file-info :initialised)
(copy-file source-file (concat source-file ".backup") nil t)
(delete-file org-file) ; to avoid the overwrite prompt
(message "Initialising...")
(org-pandoc-import-to-org nil source-file org-file t)
Expand Down

0 comments on commit f51f51e

Please sign in to comment.