Commit b227422c authored by Michael Albinus's avatar Michael Albinus

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.
parent 59d08e98
......@@ -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));
......
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