Commits

Yuya Nishihara committed 7df3baa

archive: use getSaveFileName to select non-existent file/folder for dest path

Destination path should normally be absent.

  • Participants
  • Parent commits d932a63
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgqt/archive.py

         FD = QFileDialog
         if select['type'] == 'files':
             caption = _('Select Destination Folder')
-            response = FD.getExistingDirectory(parent=self, caption=caption,
-                    directory=dest, options=FD.ShowDirsOnly | FD.ReadOnly)
+            filter = ''
         else:
-            caption = _('Open File')
+            caption = _('Select Destination File')
             ext = '*' + select['ext']
             filter = '%s (%s)\nAll Files (*.*)' % (select['label'], ext)
-            response = FD.getOpenFileName(parent=self, caption=caption,
-                    directory=dest, filter=filter, options=FD.ReadOnly)
+        response = FD.getSaveFileName(parent=self, caption=caption,
+                directory=dest, filter=filter, options=FD.ReadOnly)
         if response:
             self.dest_edit.setText(response)
             self.update_path()