Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5855f5a0 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Automerger Merge Worker
Browse files

Merge "Migrate from android::String path functions to std::filesystem" into...

Merge "Migrate from android::String path functions to std::filesystem" into main am: 0d0326fd am: c5a3087b am: cabb9a45 am: 1e3b507f am: e4229ae2

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2721818



Change-Id: I35d262506f24b5884cc75489009020413473dffc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6df881a3 e4229ae2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@ cc_library_static {
        "libselinux",
        "libbinder",
    ],
    whole_static_libs: [
        "libc++fs",
    ],

    cflags: [
        "-Wall",
+3 −4
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <utils/Mutex.h>
#include <utils/Vector.h>

#include <filesystem>
#include <getopt.h>
#include <stdlib.h>
#include <stdio.h>
@@ -69,10 +70,8 @@ public:
    virtual int openFile(const String16& path, const String16& seLinuxContext,
            const String16& mode) {
        String8 path8(path);
        char cwd[256];
        getcwd(cwd, 256);
        String8 fullPath(cwd);
        fullPath.appendPath(path8);
        auto fullPath = std::filesystem::current_path();
        fullPath /= path8.c_str();
        if (!mActive) {
            mErrorLog << "Open attempt after active for: " << fullPath << endl;
            return -EPERM;