aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/xreadlink.c4
-rw-r--r--win32/mingw.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c
index ca53e12d3..f0a63fd9b 100644
--- a/libbb/xreadlink.c
+++ b/libbb/xreadlink.c
@@ -76,7 +76,11 @@ char* FAST_FUNC xmalloc_follow_symlinks(const char *path)
76 return NULL; 76 return NULL;
77 } 77 }
78 78
79#if ENABLE_PLATFORM_MINGW32
80 if (!is_absolute_path(linkpath)) {
81#else
79 if (*linkpath != '/') { 82 if (*linkpath != '/') {
83#endif
80 bufsize += strlen(linkpath); 84 bufsize += strlen(linkpath);
81 buf = xrealloc(buf, bufsize); 85 buf = xrealloc(buf, bufsize);
82 lpc = bb_get_last_path_component_strip(buf); 86 lpc = bb_get_last_path_component_strip(buf);
diff --git a/win32/mingw.c b/win32/mingw.c
index a222e6226..1a00787b7 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -843,7 +843,7 @@ int mingw_rename(const char *pold, const char *pnew)
843 return -1; 843 return -1;
844 } 844 }
845 if (MoveFileEx(pold, pnew, 845 if (MoveFileEx(pold, pnew,
846 MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED)) 846 MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED))
847 return 0; 847 return 0;
848 /* TODO: translate more errors */ 848 /* TODO: translate more errors */
849 if (GetLastError() == ERROR_ACCESS_DENIED && 849 if (GetLastError() == ERROR_ACCESS_DENIED &&