Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
use os.path.join to generate file paths (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Scheetz authored Jan 19, 2024
1 parent a486d1f commit f6494ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llama_hub/azstorage_blob/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import math
import tempfile
import time
import os
from typing import Any, Dict, List, Optional, Union

from llama_index import download_loader
Expand Down Expand Up @@ -89,7 +90,7 @@ def load_data(self) -> List[Document]:
if self.blob:
blob_client = container_client.get_blob_client(self.blob)
stream = blob_client.download_blob()
download_file_path = f"{temp_dir}/{stream.name}"
download_file_path = os.path.join(temp_dir, stream.name)
logger.info(f"Start download of {self.blob}")
start_time = time.time()
with open(file=download_file_path, mode="wb") as download_file:
Expand All @@ -107,7 +108,7 @@ def load_data(self) -> List[Document]:
self.name_starts_with, self.include
)
for obj in blobs_list:
download_file_path = f"{temp_dir}/{obj.name}"
download_file_path = os.path.join(temp_dir, obj.name)
logger.info(f"Start download of {obj.name}")
start_time = time.time()
blob_client = container_client.get_blob_client(obj)
Expand Down

0 comments on commit f6494ae

Please sign in to comment.