Skip to content

Commit

Permalink
Merge pull request #1799 from FEX-Emu/skmp/fix-get_fdpath
Browse files Browse the repository at this point in the history
FDUtils: Fix get_fdpath
  • Loading branch information
Sonicadvance1 authored Jun 24, 2022
2 parents e4d659a + 48a574d commit aa17f64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Common/FDUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ std::string get_fdpath(int fd) {
std::filesystem::path Path = std::filesystem::path("/proc/self/fd") / std::to_string(fd);
int Result = readlinkat(AT_FDCWD, Path.c_str(), SymlinkPath, sizeof(SymlinkPath));
if (Result != -1) {
return SymlinkPath;
return std::string(SymlinkPath, Result);
}

LOGMAN_MSG_A_FMT("Couldn't get symlink from /proc/self/fd/{}", fd);
Expand Down

0 comments on commit aa17f64

Please sign in to comment.