Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
4f4126e6
Commit
4f4126e6
authored
Jun 30, 2009
by
Michael Albinus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* net/tramp.el (tramp-do-copy-or-rename-file-directly): Handle
also the 'rename case, when setting file modes. (Bug#3712)
parent
0ad6626b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/net/tramp.el
lisp/net/tramp.el
+5
-3
No files found.
lisp/ChangeLog
View file @
4f4126e6
2009-06-30 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-do-copy-or-rename-file-directly): Handle
also the 'rename case, when setting file modes. (Bug#3712)
2009-06-30 Kenichi Handa <handa@m17n.org>
* international/fontset.el (setup-default-fontset): Add CJK fonts
...
...
lisp/net/tramp.el
View file @
4f4126e6
...
...
@@ -3225,7 +3225,9 @@ KEEP-DATE means to make sure that NEWNAME has the same timestamp
as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep
the uid and gid from FILENAME."
(let ((t1 (tramp-tramp-file-p filename))
(t2 (tramp-tramp-file-p newname)))
(t2 (tramp-tramp-file-p newname))
(file-times (nth 5 (file-attributes filename)))
(file-modes (tramp-default-file-modes filename)))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(let* ((cmd (cond ((and (eq op 'copy) preserve-uid-gid) "cp -f -p")
((eq op 'copy) "cp -f")
...
...
@@ -3364,8 +3366,8 @@ the uid and gid from FILENAME."
;; Set the time and mode. Mask possible errors.
(condition-case nil
(when keep-date
(set-file-times newname
(nth 5 (file-attributes filename))
)
(set-file-modes newname
(tramp-default-file-modes filename)
))
(set-file-times newname
file-times
)
(set-file-modes newname
file-modes
))
(error)))))
(defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment