[chirp_devel] [PATCH] [ui] Replace / with _ in default filenames. Fixes #3797. Related to #3753
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1467758450 25200 # Tue Jul 05 15:40:50 2016 -0700 # Node ID 0fb2340c1de9a353cb0eb7d0a2190585e3692e03 # Parent 62236873e87473bc926b06ac2aafab9a7926eec0 [ui] Replace / with _ in default filenames. Fixes #3797. Related to #3753
The FT-857/897 driver has a slash in the model name. When used in the filename, this slash is interpreted as a directory on Linux and implodes on Windows. Neither is intended behavior.
This patch substitues an underscore for a slash when generating a default filename.
diff -r 62236873e874 -r 0fb2340c1de9 chirp/ui/mainapp.py --- a/chirp/ui/mainapp.py Fri Jul 01 17:31:27 2016 -0400 +++ b/chirp/ui/mainapp.py Tue Jul 05 15:40:50 2016 -0700 @@ -439,7 +439,8 @@ defname = defname_format.format( vendor=eset.radio.VENDOR, model=eset.radio.MODEL, - date=datetime.now().strftime('%Y%m%d')) + date=datetime.now().strftime('%Y%m%d') + ).replace('/', '_')
types = [(label + " (*.%s)" % eset.radio.FILE_EXTENSION, eset.radio.FILE_EXTENSION)]
participants (1)
-
Tom Hayward