+2007-10-23 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-set-file-uid-gid): Protect `call-process'
+ when we are local.
+
2007-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/python.el (python-current-defun): Remove left-over
;; We handle also the local part, because there doesn't exist
;; `set-file-uid-gid'.
(let ((uid (or (and (integerp uid) uid) (tramp-get-local-uid 'integer)))
- (gid (or (and (integerp gid) gid) (tramp-get-local-uid 'integer)))
+ (gid (or (and (integerp gid) gid) (tramp-get-local-gid 'integer)))
(default-directory (tramp-compat-temporary-file-directory)))
- (call-process
- "chown" nil nil nil
- (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))
+ ;; "chown" might not exist, for example on Win32.
+ (condition-case nil
+ (call-process
+ "chown" nil nil nil
+ (format "%d:%d" uid gid) (tramp-shell-quote-argument filename))
+ (error nil)))))
;; Simple functions using the `test' command.