diff --git a/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp b/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp index 80f27dc5..90b22786 100644 --- a/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp +++ b/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp @@ -99,7 +99,7 @@ void encrypt_provider::create_item_meta(api_meta_map &meta, bool directory, meta[META_MODE] = std::to_string(buf.st_mode); meta[META_MODIFIED] = std::to_string(file.modified_date); #if defined(__APPLE__) - meta[META_OSXFLAGS]; + meta[META_OSXFLAGS] = std::to_string(buf.st_flags); #endif // defined(__APPLE__) meta[META_SIZE] = std::to_string(file.file_size); meta[META_SOURCE] = file.source_path; diff --git a/support/src/utils/file.cpp b/support/src/utils/file.cpp index 4a383d9b..e71d197e 100644 --- a/support/src/utils/file.cpp +++ b/support/src/utils/file.cpp @@ -53,13 +53,11 @@ auto change_to_process_directory() -> bool { } #else // !defined(_WIN32) std::string path; - path.resize(PATH_MAX + 1); + path.resize(repertory::max_path_length + 1); #if defined(__APPLE__) auto res = proc_pidpath(getpid(), reinterpret_cast(path.data()), static_cast(path.size())); - if (res == 0) { - path = utils::path::get_parent_path(path); - } + path = path.c_str(); #else // !defined(__APPLE__) auto res = readlink("/proc/self/exe", path.data(), path.size()); if (res == -1) {