diff -ur v22/site_ut.py v23/site_ut.py --- v22/site_ut.py 2020-04-29 15:51:28.000000000 +0900 +++ v23/site_ut.py 2020-04-29 19:31:09.000000000 +0900 @@ -96,15 +96,19 @@ with open( path + '/' + scr, 'w' ) as f: f.write( s ) -def put(url, path, lmt_size, scr='dl.sh'): +def put(url, path, st, scr='dl.sh'): + lmt_size = st.lmt_size if os.path.isdir( path ): lst = cmd_lst( 'find {} -type f -o -type l'.format( path ) ) for path_ in lst: - put( url, path_, lmt_size, scr ) + put( url, path_, st, scr ) return if not lmt_size or os.path.getsize( path ) <= to_num( lmt_size ): - cmd = cmd_ut.cmd_py( 'ftp_ut' ) + ' ' + path + opt = '-SITE "{} {} {}"'.format( st.host, st.user, st.passwd ) + if st.path: + opt += ' -C {}'.format( st.path ) + cmd = cmd_ut.cmd_py( 'ftp_ut' ) + ' ' + opt + ' ' + path call( cmd ) return @@ -172,7 +176,7 @@ def put_(path): - put( st.url, path, st.lmt_size ) + put( st.url, path, st ) def get_(path): dbg.out('url={} path={} curr={}'.format( st.url, path, os.getcwd() ) )