From 892dbc21f97822bf3615981dbb11d0eb99981b4f Mon Sep 17 00:00:00 2001
From: "zhouxin5253@163.com" <9a@2gvp!hs3>
Date: Sun, 17 Jan 2021 08:54:36 +0800
Subject: [PATCH] =?UTF-8?q?fix=20bug:=20=E6=94=AF=E6=8C=810=E5=AD=97?=
=?UTF-8?q?=E8=8A=82=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 2 +-
.../webdavteambition/store/TeambitionFileSystemStore.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index c09e70e..89f750c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
com.github.zxbu
webdav-teambition
- 0.0.1-SNAPSHOT
+ 0.0.2-SNAPSHOT
webdav-teambition
Demo project for Spring Boot
diff --git a/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java b/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java
index 2ceda4f..9447ef3 100644
--- a/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java
+++ b/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java
@@ -88,8 +88,8 @@ public class TeambitionFileSystemStore implements IWebdavStore {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = requestAttributes.getRequest();
int contentLength = request.getContentLength();
- if (contentLength <= 0) {
- return 0;
+ if (contentLength < 0) {
+ contentLength = 0;
}
teambitionClientService.uploadPre(resourceUri, contentLength, content);
return contentLength;