We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ceda42e + 1fb49e2 commit 7483c9fCopy full SHA for 7483c9f
src/e3/net/http.py
@@ -19,7 +19,7 @@
19
import e3.log
20
import requests_toolbelt.multipart
21
from e3.error import E3Error
22
-from e3.fs import rm
+from e3.fs import rm, mkdir
23
24
if TYPE_CHECKING:
25
from types import TracebackType
@@ -314,6 +314,11 @@ def download_file(
314
315
path = os.path.join(dest, filename)
316
317
+ # create dest subdir if they do not exist
318
+ dest_dir = os.path.dirname(path)
319
+ if not os.path.exists(dest_dir):
320
+ mkdir(dest_dir)
321
+
322
logger.info("downloading %s size=%s", path, content_length)
323
324
with open(path, "wb") as fd:
0 commit comments