From: Kai Gro?j. <ka...@us...> - 2002-03-06 11:54:31
|
Update of /cvsroot/tramp/tramp/lisp In directory usw-pr-cvs1:/tmp/cvs-serv5779/tramp/lisp Modified Files: ChangeLog tramp.el Log Message: (tramp-handle-make-symbolic-link) (tramp-handle-directory-files) (tramp-handle-file-name-all-completions) (tramp-handle-dired-call-process, tramp-handle-insert-directory) (tramp-handle-expand-file-name, tramp-handle-shell-command): Make sure to "cd" back to the home dir. Otherwise, previous commands could affect future commands because of the wrong cwd. (tramp-shell-quote-argument): Don't invoke substring on short strings. Index: ChangeLog =================================================================== RCS file: /cvsroot/tramp/tramp/lisp/ChangeLog,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -d -r2.89 -r2.90 *** ChangeLog 3 Mar 2002 16:47:28 -0000 2.89 --- ChangeLog 6 Mar 2002 11:54:26 -0000 2.90 *************** *** 1,2 **** --- 1,19 ---- + 2002-03-06 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> + + * tramp.el (tramp-handle-make-symbolic-link) + (tramp-handle-directory-files) + (tramp-handle-file-name-all-completions) + (tramp-handle-dired-call-process, tramp-handle-insert-directory) + (tramp-handle-expand-file-name, tramp-handle-shell-command): Make + sure to "cd" back to the home dir. Otherwise, previous commands + could affect future commands because of the wrong cwd. + (tramp-shell-quote-argument): Don't invoke substring on short + strings. + + 2002-03-05 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> + + * tramp.el (tramp-shell-quote-argument): If the argument starts + with "~", don't quote that. Reported by Martin Guertler. + 2002-03-03 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> Index: tramp.el =================================================================== RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -d -r2.89 -r2.90 *** tramp.el 1 Mar 2002 11:30:54 -0000 2.89 --- tramp.el 6 Mar 2002 11:54:26 -0000 2.90 *************** *** 1300,1304 **** cwd ln (tramp-file-name-path file) ; target ! (tramp-file-name-path link)))))) ; link name --- 1300,1305 ---- cwd ln (tramp-file-name-path file) ; target ! (tramp-file-name-path link)) ; link name ! t)))) *************** *** 1825,1829 **** x) result) ! (push x result))))) result)) --- 1826,1832 ---- x) result) ! (push x result)))) ! (tramp-send-command multi-method method user host "cd") ! (tramp-wait-for-output)) result)) *************** *** 1871,1874 **** --- 1874,1880 ---- (tramp-line-end-position)) result)) + + (tramp-send-command multi-method method user host "cd") + (tramp-wait-for-output) ;; Return the list. *************** *** 2180,2184 **** (insert-buffer (tramp-get-buffer multi-method method user host))) (save-excursion ! (tramp-send-command-and-check multi-method method user host nil)))) ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm --- 2186,2193 ---- (insert-buffer (tramp-get-buffer multi-method method user host))) (save-excursion ! (prog1 ! (tramp-send-command-and-check multi-method method user host nil) ! (tramp-send-command multi-method method user host "cd") ! (tramp-wait-for-output))))) ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm *************** *** 2258,2261 **** --- 2267,2273 ---- (let ((zmacs-region-stays t)) (exchange-point-and-mark)) + (save-excursion + (tramp-send-command multi-method method user host "cd") + (tramp-wait-for-output)) ;; Another XEmacs specialty follows. What's the right way to do ;; it? *************** *** 2325,2329 **** (tramp-send-command multi-method method user host ! (format "cd %s; pwd" uname)) (tramp-wait-for-output) (goto-char (point-min)) --- 2337,2342 ---- (tramp-send-command multi-method method user host ! (format "cd %s; pwd" uname) ! t) (tramp-wait-for-output) (goto-char (point-min)) *************** *** 2380,2383 **** --- 2393,2398 ---- (insert-buffer (tramp-get-buffer multi-method method user host)) (save-excursion + (tramp-send-command multi-method method user host "cd") + (tramp-wait-for-output) (tramp-send-command multi-method method user host *************** *** 4783,4786 **** --- 4798,4804 ---- (let ((result (shell-quote-argument s)) (nl (regexp-quote (format "\\%s" tramp-rsh-end-of-line)))) + (when (and (>= (length result) 2) + (string= (substring result 0 2) "\\~")) + (setq result (substring result 1))) (while (string-match nl result) (setq result (replace-match (format "'%s'" tramp-rsh-end-of-line) |