Alexandre Julliard : relpath: Properly handle a "." directory name.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Aug 15 13:33:32 CDT 2006


Module: wine
Branch: master
Commit: 65c9113e8f4ebef8d96b0b59c050e3886ea75ea3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=65c9113e8f4ebef8d96b0b59c050e3886ea75ea3

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Aug 15 17:32:41 2006 +0200

relpath: Properly handle a "." directory name.

---

 tools/relpath.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/relpath.c b/tools/relpath.c
index ceb1d36..117ecef 100644
--- a/tools/relpath.c
+++ b/tools/relpath.c
@@ -30,6 +30,9 @@ static const char *get_relative_path( co
 #define DIR_END(p)  (*(p) == 0 || *(p) == '/')
     const char *start;
 
+    /* a path of "." is equivalent to an empty path */
+    if (!strcmp( from, "." )) from = "";
+
     *dotdots = 0;
     for (;;)
     {




More information about the wine-cvs mailing list