Acked-by: Sairam Venugopal <vsai...@vmware.com>
On 8/12/16, 12:39 AM, "Alin Serdean" <aserd...@cloudbasesolutions.com> wrote: >On Windows if a file path contains ":" we can safely say it is an absolute >file name. > >This patch allows file_name checks to report correctly when using >"abs_file_name". > >Found by testing. > >Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com> >--- > lib/util.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/lib/util.c b/lib/util.c >index 241a7f1..689a9de 100644 >--- a/lib/util.c >+++ b/lib/util.c >@@ -926,6 +926,10 @@ abs_file_name(const char *dir, const char *file_name) > { > if (file_name[0] == '/') { > return xstrdup(file_name); >+#ifdef _WIN32 >+ } else if (strchr(file_name, ':')) { >+ return xstrdup(file_name); >+#endif > } else if (dir && dir[0]) { > char *separator = dir[strlen(dir) - 1] == '/' ? "" : "/"; > return xasprintf("%s%s%s", dir, separator, file_name); >-- >2.9.2.windows.1 >_______________________________________________ >dev mailing list >dev@openvswitch.org >https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma >n_listinfo_dev&d=CwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Dc >ruz40PROJ40ROzSpxyQSLw6fcrOWpJgEcEmNR3JEQ&m=xQ37r3Cs2LrDS2BtxjMqcke68_eXVY >M7PECpuQ6Vxi4&s=EiUP5NrKR3MUji4sJ7Yem3vAJyk4VDp2729T6GTgHzA&e= _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev