1
0
Эх сурвалжийг харах

Bug 1813: Cannot list WebDAV directory when any of the files is locked and the <depth> or <timeout> elements contain whitespaces around its contents (2nd)

https://winscp.net/tracker/1813

Source commit: cc13aa344d5d208321ae8c36bf1a73ddc14df855
Martin Prikryl 5 жил өмнө
parent
commit
5734644751

+ 6 - 1
libs/neon/src/ne_locks.c

@@ -488,7 +488,12 @@ end_element_common(struct ne_lock *l, int state, const char *cdata)
 	break;
     case ELM_timeout:
 	NE_DEBUG(NE_DBG_LOCKS, "Got timeout: %s\n", cdata);
-	l->timeout = parse_timeout(cdata);
+	{
+	char * timeout = strdup(cdata);
+	char * timeout_shaved = ne_shave(timeout, "\r\n\t ");
+	l->timeout = parse_timeout(timeout_shaved);
+	ne_free(timeout);
+	}
 	if (l->timeout == NE_TIMEOUT_INVALID) {
 	    return -1;
 	}