summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2014-05-12 13:10:04 +0200
committerGerrit Code Review <gerrit2@gerrit>2014-05-31 14:22:07 +0200
commitcbe764c42b7f39e833c70f2f00b704aef76aa1fb (patch)
tree838cc524990933aee12f3d00b00b9b3858577d3a
parentAdd script to convert TrueTypeFonts to TWRP's .dat format (diff)
downloadandroid_bootable_recovery-cbe764c42b7f39e833c70f2f00b704aef76aa1fb.tar
android_bootable_recovery-cbe764c42b7f39e833c70f2f00b704aef76aa1fb.tar.gz
android_bootable_recovery-cbe764c42b7f39e833c70f2f00b704aef76aa1fb.tar.bz2
android_bootable_recovery-cbe764c42b7f39e833c70f2f00b704aef76aa1fb.tar.lz
android_bootable_recovery-cbe764c42b7f39e833c70f2f00b704aef76aa1fb.tar.xz
android_bootable_recovery-cbe764c42b7f39e833c70f2f00b704aef76aa1fb.tar.zst
android_bootable_recovery-cbe764c42b7f39e833c70f2f00b704aef76aa1fb.zip
Diffstat (limited to '')
-rw-r--r--find_file.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/find_file.cpp b/find_file.cpp
index f56f243de..8ae0a51b4 100644
--- a/find_file.cpp
+++ b/find_file.cpp
@@ -33,7 +33,7 @@ Find_File::Find_File() {
}
string Find_File::Find_Internal(const string& filename, const string& starting_path) {
- DIR *d = opendir(starting_path.c_str());
+ DIR *d;
string new_path, return_path;
vector<string> dirs;
vector<string> symlinks;
@@ -45,6 +45,7 @@ string Find_File::Find_Internal(const string& filename, const string& starting_p
}
searched_dirs.push_back(starting_path);
+ d = opendir(starting_path.c_str());
if (d == NULL) {
LOGERR("Find_File: Error opening '%s'\n", starting_path.c_str());
return "";