comparison liboctave/file-stat.cc @ 5871:b9fd54407c8d

[project @ 2006-06-30 16:48:39 by jwe]
author jwe
date Fri, 30 Jun 2006 16:48:40 +0000
parents ace8d8d26933
children 56a7de3f6451
comparison
equal deleted inserted replaced
5870:a0218194daa6 5871:b9fd54407c8d
33 #include <sys/types.h> 33 #include <sys/types.h>
34 #endif 34 #endif
35 #include <unistd.h> 35 #include <unistd.h>
36 #endif 36 #endif
37 37
38 #include "file-ops.h"
38 #include "file-stat.h" 39 #include "file-stat.h"
39 #include "statdefs.h" 40 #include "statdefs.h"
40 41
41 #if !defined (HAVE_LSTAT) 42 #if !defined (HAVE_LSTAT)
42 static inline int 43 static inline int
194 { 195 {
195 if (! initialized || force) 196 if (! initialized || force)
196 { 197 {
197 initialized = false; 198 initialized = false;
198 fail = false; 199 fail = false;
199 200
200 const char *cname = file_name.c_str (); 201 std::string full_file_name = file_ops::tilde_expand (file_name);
202
203 const char *cname = full_file_name.c_str ();
201 204
202 struct stat buf; 205 struct stat buf;
203 206
204 int status = follow_links ? stat (cname, &buf) : lstat (cname, &buf); 207 int status = follow_links ? stat (cname, &buf) : lstat (cname, &buf);
205 208