summaryrefslogtreecommitdiffstats
path: root/fixPermissions.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-06-11 19:22:55 +0200
committerEthan Yonker <dees_troy@teamw.in>2014-06-13 15:57:48 +0200
commit5eac222cfe65ea7458bb715e009841e1d15240c5 (patch)
treeb4178c3427202aea871dad954ef5a8491a9d662e /fixPermissions.cpp
parentlibtar: don't set parent dir's context when extracting a file (diff)
downloadandroid_bootable_recovery-5eac222cfe65ea7458bb715e009841e1d15240c5.tar
android_bootable_recovery-5eac222cfe65ea7458bb715e009841e1d15240c5.tar.gz
android_bootable_recovery-5eac222cfe65ea7458bb715e009841e1d15240c5.tar.bz2
android_bootable_recovery-5eac222cfe65ea7458bb715e009841e1d15240c5.tar.lz
android_bootable_recovery-5eac222cfe65ea7458bb715e009841e1d15240c5.tar.xz
android_bootable_recovery-5eac222cfe65ea7458bb715e009841e1d15240c5.tar.zst
android_bootable_recovery-5eac222cfe65ea7458bb715e009841e1d15240c5.zip
Diffstat (limited to 'fixPermissions.cpp')
-rw-r--r--fixPermissions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/fixPermissions.cpp b/fixPermissions.cpp
index 121fe32fe..b98a8c7f5 100644
--- a/fixPermissions.cpp
+++ b/fixPermissions.cpp
@@ -117,6 +117,10 @@ int fixPermissions::fixDataInternalContexts(void) {
dir = "/data/media/0";
else
dir = "/data/media";
+ if (!TWFunc::Path_Exists(dir)) {
+ LOGINFO("fixDataInternalContexts: '%s' does not exist!\n", dir.c_str());
+ return 0;
+ }
LOGINFO("Fixing %s contexts\n", dir.c_str());
restorecon(dir, &sb);
d = opendir(dir.c_str());