diff --git a/view/Progress_bar.py b/view/Progress_bar.py index dee30a7..18ed3ef 100644 --- a/view/Progress_bar.py +++ b/view/Progress_bar.py @@ -22,7 +22,11 @@ def stream_progress( uploading_file, filename, fraction_reported ): """ + FILENAME_TRUNCATION_WIDTH = 40 base_filename = filename.split( u"/" )[ -1 ].split( u"\\" )[ -1 ] + if len( base_filename ) > FILENAME_TRUNCATION_WIDTH: + base_filename = base_filename[ : FILENAME_TRUNCATION_WIDTH ] + u"..." + yield \ u"""
uploading %s: