[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 b227422: Fix error in Tramp perl script for cygwi
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs-25 b227422: Fix error in Tramp perl script for cygwin |
Date: |
Wed, 09 Dec 2015 11:17:30 +0000 |
branch: emacs-25
commit b227422c66f20806f406730f8ef7dea276956151
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Fix error in Tramp perl script for cygwin
* lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not raise an
error if file doesn't exist.
---
lisp/net/tramp-sh.el | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c1df1c6..03492de 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -597,9 +597,14 @@ we have this shell function.")
use File::Spec;
use Cwd \"realpath\";
+sub myrealpath {
+ my ($file) = @_;
+ return realpath($file) if -e $file;
+}
+
sub recursive {
my ($volume, @dirs) = @_;
- my $real = realpath(File::Spec->catpath(
+ my $real = myrealpath(File::Spec->catpath(
$volume, File::Spec->catdir(@dirs), \"\"));
if ($real) {
my ($vol, $dir) = File::Spec->splitpath($real, 1);
@@ -613,7 +618,7 @@ sub recursive {
}
}
-$result = realpath($ARGV[0]);
+$result = myrealpath($ARGV[0]);
if (!$result) {
my ($vol, $dir) = File::Spec->splitpath($ARGV[0], 1);
($vol, @dirs) = recursive($vol, File::Spec->splitdir($dir));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 b227422: Fix error in Tramp perl script for cygwin,
Michael Albinus <=