Commits

Yuya Nishihara committed c33026a

rename: use getSaveFileName to select non-existent file for dest path

Destination file should normally be absent.

  • Participants
  • Parent commits fc22fbe
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/rename.py

                 caption = _('Select Destination Folder')
         FD = QFileDialog
         if os.path.isfile(curr):
-            path = FD.getOpenFileName(parent=self, caption=caption,
-                    options=FD.ReadOnly)
+            if mode == 'src':
+                path = FD.getOpenFileName(parent=self, caption=caption,
+                                          options=FD.ReadOnly)
+            else:
+                path = FD.getSaveFileName(parent=self, caption=caption,
+                                          options=FD.ReadOnly)
         else:
             path = FD.getExistingDirectory(parent=self, caption=caption,
                     options=FD.ShowDirsOnly | FD.ReadOnly)