diff --git a/util.cpp b/util.cpp index 68755095..4cb47ce4 100644 --- a/util.cpp +++ b/util.cpp @@ -26,6 +26,13 @@ void MakePathRelative(char *basep, char *pathp) if(!(base[com] && path[com])) return; // weird, prefix is entire string if(com == 0) return; // maybe on different drive letters? + // Align the common prefix to the nearest slash; otherwise would break + // on subdirectories or filenames that shared a prefix. + while(com >= 1 && base[com-1] != '/' && base[com-1] != '\\') { + com--; + } + if(com == 0) return; + int sections = 0; int secLen = 0, secStart = 0; for(i = com; base[i]; i++) { diff --git a/wishlist.txt b/wishlist.txt index 48d9cf93..457f1bc0 100644 --- a/wishlist.txt +++ b/wishlist.txt @@ -1,8 +1,9 @@ get rid of the oops() calls in the mesh codes -auto-generate circles and faces when lathing -copy the section geometry to other end when sweeping -cylindrical faces +trace point feature +smooth shading +leak fixing +cylindrical faces? long term