@@ -27,7 +27,7 @@ def _validate_upload_content(
2727):
2828 gz_suffix = ".gz"
2929 stage_path = f"@{ stage_name } /{ base_file_name } "
30- local_path = f" { local_dir } / { base_file_name } "
30+ local_path = os . path . join ( local_dir , base_file_name )
3131
3232 cursor .execute (
3333 f"GET ? 'file://{ local_dir } '" , params = [stage_path ], _force_qmark_paramstyle = True
@@ -90,7 +90,7 @@ def test_upload(
9090):
9191 def upload_task (cursor , stage_name , temp_dir , base_file_name ):
9292 cursor ._upload (
93- local_file_name = f"file://{ temp_dir } / { base_file_name } " ,
93+ local_file_name = f"file://{ os . path . join ( temp_dir , base_file_name ) } " ,
9494 stage_location = f"@{ stage_name } " ,
9595 options = {"auto_compress" : is_compressed },
9696 )
@@ -105,10 +105,10 @@ def test_upload_stream(
105105 is_compressed : bool ,
106106):
107107 def upload_stream_task (cursor , stage_name , temp_dir , base_file_name ):
108- with open (f"{ temp_dir } / { base_file_name } " , "rb" ) as input_stream :
108+ with open (f"{ os . path . join ( temp_dir , base_file_name ) } " , "rb" ) as input_stream :
109109 cursor ._upload_stream (
110110 input_stream = input_stream ,
111- stage_location = f"@{ stage_name } / { base_file_name } " ,
111+ stage_location = f"@{ os . path . join ( stage_name , base_file_name ) } " ,
112112 options = {"auto_compress" : is_compressed },
113113 )
114114
0 commit comments