d-a-v / ESPWebDAV

macOS, linux, windows: Natively sharing files - port 80 is shared
Other
42 stars 9 forks source link

Rename first directory with a namesize <=2 bug #8

Closed luc-github closed 3 years ago

luc-github commented 3 years ago

Using V2 under windows 10 and esp8266 nodeMCU with latest esp8266 git

1 use serial F to Format 2 C to create readme 3 - mount a drive in windows 10 4 - create folder readme.md 0MiB 0KiB 6 [New folder] 5- refresh is ok image

6 rename folder to A image

readme.md                                  0MiB      0KiB 6
[A]

7 just refresh image but serial is still ok

readme.md                                  0MiB      0KiB 6
[A]

8 - create new folder again image

readme.md                                  0MiB      0KiB 6
[A]
[New folder]

image

9 - refresh is ok for second folder image

readme.md                                  0MiB      0KiB 6
[A]
[B]

Issue happen only if new name is 1 or 2 char long - no issue if 3 or more

luc-github commented 3 years ago

the issue is here :https://github.com/d-a-v/ESPWebDAV/blob/v2/ESPWebDAV.cpp#L646-L652 replacing these line by sendPropResponse(true, uri ,0, time(nullptr), 0); solve the issue