summaryrefslogtreecommitdiff
path: root/lib/common
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-11-05 23:41:41 +0000
committerChris Wilson <chris+github@qwirx.com>2007-11-05 23:41:41 +0000
commit322a8c4719e54e637533593faaa9a82cd92a6f40 (patch)
tree14df47cbf15ba89a21a1ef3fc8aaf18e1b28150f /lib/common
parentad8c0050663463b471118960875c2adcfa30d0ac (diff)
Use lstat() instead of stat() to check whether a file exists. Thanks to
Hans-Joachim Baader for reporting this problem. (http://lists.warhead.org.uk/pipermail/boxbackup/2007-November/003958.html) Add a test that symlinks are not followed during restore.
Diffstat (limited to 'lib/common')
-rw-r--r--lib/common/Utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp
index de392ef4..83a12ccf 100644
--- a/lib/common/Utils.cpp
+++ b/lib/common/Utils.cpp
@@ -98,7 +98,7 @@ void DumpStackBacktrace()
bool FileExists(const char *Filename, int64_t *pFileSize, bool TreatLinksAsNotExisting)
{
struct stat st;
- if(::stat(Filename, &st) != 0)
+ if(::lstat(Filename, &st) != 0)
{
if(errno == ENOENT)
{