Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1678

pyside2-uic deletes existing output file when source file does not exist

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 5.15.2
    • PySide
    • None
    • Windows

    Description

      When using pyside2-uic, the output file specified with the -o flag gets deleted if the source file does not exist.
      Example:

      PS C:\some_path> pyside2-uic .\source_file.ui -o .\output_file.py
      Error: File '.\source_file.ui' is not valid
      
      while executing 'c:\venv_path\venv\lib\site-packages\PySide2\uic -g python .\source_file.ui -o .\output_file.py'
      

      Accidents happen. If .\output_file.py has been accidentally set to the application file, said file is lost and one is left to start work back at the previous commit.

      Could it not delete the existing output file? Some of us work in encrypted disks and cannot easily recover deleted files :-/ Thanks

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            limeylime Clément Jacquard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes