Finally fixed the annoying `Invalid cross-device link' problem.
[mmh] / sbr / m_mktemp.c
index 4a1eed1..4c7703c 100644 (file)
@@ -124,7 +124,7 @@ m_mktemp2(
                return m_mktemp(pfx_in, fd_ret, fp_ret);
        }
        n = (int)(cp-dir_in-1); /* Length of dir component */
-       snprintf(buffer, sizeof(buffer), "%.*s%s", n, dir_in, pfx_in);
+       snprintf(buffer, sizeof(buffer), "%.*s/%s", n, dir_in, pfx_in);
        return m_mktemp(buffer, fd_ret, fp_ret);
 }