damies13 / rfswarm

Robot Framework Swarm
GNU General Public License v3.0
112 stars 21 forks source link

Saving a Reporter template file in Windows does not work correctly #257

Closed ArekKuczynski closed 2 months ago

ArekKuczynski commented 2 months ago

Describe the bug When you save a template file in windows only typing the name you want without .template extension, it will only be saved as a regular file without extension.

To Reproduce Steps to reproduce the behavior:

  1. Open RFSwarm-Reporter
  2. Save template
  3. Save it by specifying the file name without .template extension
  4. See that the file is saved as a regular file

Expected behavior File should be saved with extension even when you only type just a file name Screenshots image

then:

Screenshot 2024-06-27 124729

Desktop (please complete the following information):

damies13 commented 2 months ago

Did a little investigating....

In the manager when I save the scenario with mnu_file_SaveAs I do a check for the file extension and add .rfs if it's not there

In reporter when I save the template with mnu_template_SaveAs I don't check the extension and add it if it's missing

Looking at the documentation for tkinter.filedialog, there's a defaultextension option, so I might try using that first.

Strange that the behavior is different on windows vs MacOS and Linux.

damies13 commented 2 months ago

Thanks @ArekKuczynski for the test cases and bug fix :+1: Merged into branch v1.3.2