From 6288b8dfaee191cf6addab278f51764d784ff024 Mon Sep 17 00:00:00 2001 From: zyr17 Date: Thu, 14 Mar 2024 21:43:41 +0800 Subject: [PATCH] fix bug --- src/algo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/algo.cpp b/src/algo.cpp index 06cd974..77460ea 100644 --- a/src/algo.cpp +++ b/src/algo.cpp @@ -336,7 +336,8 @@ int Access(const char *filename, int mode){ std::string full_filename = Header::datafolderprefix + filename; #ifdef __APPLE__ // 如果是访问data,apple需要重设路径到Header::appledatafolderprefix - if (filename.find("data/") == 0) + std::string filename_string = filename; + if (filename_string.find("data/") == 0) full_filename = Header::appledatafolderprefix + filename; #endif std::cout << "Access " << full_filename << '\n';