Change 13690 by jhi@alpha on 2001/12/14 20:26:51
User may not have a valid home directory even if
getpwuid() succedds.
Affected files ...
.... //depot/perl/ext/File/Glob/t/basic.t#5 edit
Differences ...
==== //depot/perl/ext/File/Glob/t/basic.t#5 (xtext) ====
Index: perl/ext/File/Glob/t/basic.t
--- perl/ext/File/Glob/t/basic.t.~1~ Fri Dec 14 13:30:05 2001
+++ perl/ext/File/Glob/t/basic.t Fri Dec 14 13:30:05 2001
@@ -49,9 +49,11 @@
($name, $home) = (getpwuid($>))[0,7];
1;
} and do {
- @a = bsd_glob("~$name", GLOB_TILDE);
- if (defined $home && (scalar(@a) != 1 || $a[0] ne $home || GLOB_ERROR)) {
- print "not ";
+ if (defined $home && defined $name && -d $home) {
+ @a = bsd_glob("~$name", GLOB_TILDE);
+ if ((scalar(@a) != 1 || $a[0] ne $home || GLOB_ERROR)) {
+ print "not ";
+ }
}
};
}
End of Patch.