Fix missing parent dir not handled corrently when uploading file

This commit is contained in:
Ming Ming 2022-07-08 16:30:51 +08:00
parent f1c42aef88
commit 715bfaa0ee

View file

@ -21,7 +21,7 @@ class PutFileBinary {
await fileRepo.putBinary(account, path, content);
} catch (e) {
if (e is ApiException &&
e.response.statusCode == 404 &&
(e.response.statusCode == 404 || e.response.statusCode == 409) &&
shouldCreateMissingDir) {
// no dir
_log.info("[call] Auto creating parent dirs");