From 6f7d4f5a7532c7c9bfc8ce56fec7b53199956db0 Mon Sep 17 00:00:00 2001 From: insofaras Date: Wed, 24 Feb 2016 16:56:35 +0000 Subject: [PATCH] less broken file_paths_equal for linux --- linux_4ed.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linux_4ed.cpp b/linux_4ed.cpp index ded42bed..d5e95266 100644 --- a/linux_4ed.cpp +++ b/linux_4ed.cpp @@ -373,13 +373,13 @@ Sys_File_Paths_Equal_Sig(system_file_paths_equal){ b32 result = 0; char* real_a = realpath(path_a, NULL); - char* real_b = realpath(path_b, NULL); - - if(real_a && real_b){ - result = strcmp(real_a, real_b); - + if(real_a){ + char* real_b = realpath(path_b, NULL); + if(real_b){ + result = strcmp(real_a, real_b) == 0; + free(real_b); + } free(real_a); - free(real_b); } return result;