telegram-history-dump icon indicating copy to clipboard operation
telegram-history-dump copied to clipboard

Period at the end of chat name causes crash

Open hbh7 opened this issue 6 years ago • 2 comments

Hey all,

Not sure how I never ran into this before. Seems that it gave the chat name (shortened) "Book." some weird name (OMCVRV~I) and has now decided to stop doing that. Pulling up the output in windows shows the full chat name but with a floating in the middle period at the end.

The error is as follows:

Traceback (most recent call last):
20: from telegram-history-dump.rb:375:in `<main>'
19: from telegram-history-dump.rb:375:in `each_with_index'
18: from telegram-history-dump.rb:375:in `each'
17: from telegram-history-dump.rb:379:in `block in <main>'
16: from telegram-history-dump.rb:109:in `dump_dialog'
15: from telegram-history-dump.rb:109:in `reverse_each'
14: from telegram-history-dump.rb:145:in `block in dump_dialog'
13: from telegram-history-dump.rb:171:in `process_media'
12: from telegram-history-dump.rb:171:in `each'
11: from telegram-history-dump.rb:190:in `block in process_media'
10: from /usr/lib/ruby/2.5.0/fileutils.rb:358:in `cp'
 9: from /usr/lib/ruby/2.5.0/fileutils.rb:1461:in `fu_each_src_dest'
 8: from /usr/lib/ruby/2.5.0/fileutils.rb:1479:in `fu_each_src_dest0'
 7: from /usr/lib/ruby/2.5.0/fileutils.rb:1463:in `block in fu_each_src_dest'
 6: from /usr/lib/ruby/2.5.0/fileutils.rb:359:in `block in cp'
 5: from /usr/lib/ruby/2.5.0/fileutils.rb:432:in `copy_file'
 4: from /usr/lib/ruby/2.5.0/fileutils.rb:1291:in `copy_file'
 3: from /usr/lib/ruby/2.5.0/fileutils.rb:1291:in `open'
 2: from /usr/lib/ruby/2.5.0/fileutils.rb:1292:in `block in copy_file'
 1: from /usr/lib/ruby/2.5.0/fileutils.rb:1292:in `open'
/usr/lib/ruby/2.5.0/fileutils.rb:1292:in `initialize': No such file or directory @ rb_sysopen - (path)/Book./download_803735657_65258.jpg (Errno::ENOENT)

I suppose I'll look into how to perhaps override the naming scheme but I'm not sure how far I'll get and I'm sure there's a better solution possible.

Thanks

hbh7 avatar Jul 03 '18 04:07 hbh7

Created #108 as a potential fix for the issue

hbh7 avatar Jul 04 '18 14:07 hbh7

Pull request

Arunm0111986 avatar May 29 '22 21:05 Arunm0111986