Commit d818ffa8 authored by Fabián Ezequiel Gallina's avatar Fabián Ezequiel Gallina Committed by Fabián Ezequiel Gallina
Browse files

Use convert-standard-filename to fix temp files path

parent d8e594db
......@@ -1054,7 +1054,7 @@ commands.)"
(let* ((contents (buffer-substring start end))
(current-file (buffer-file-name))
(process (python-shell-get-or-create-process))
(temp-file (make-temp-file "py")))
(temp-file (convert-standard-filename (make-temp-file "py"))))
(with-temp-file temp-file
(insert contents)
......@@ -1062,17 +1062,6 @@ commands.)"
(message (format "Sent: %s..."
(buffer-substring (point-min)
;; Fix Windows/MS-DOS temp file path
(when (or (eq system-type 'windows-nt)
(eq system-type 'ms-dos)
(eq system-type 'cygwin))
(setq temp-file
(insert temp-file)
(goto-char (point-min))
(while (search-forward "/" nil t)
(replace-match "\\" nil t))
(buffer-substring (point-min) (point-max)))))
(with-current-buffer (process-buffer process)
(setq inferior-python-mode-current-file current-file)
(setq inferior-python-mode-current-temp-file temp-file))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment