Bug: "Rename" Opens to Default Directory, Can End Up Moving File

  • Description: When “Rename” is selected from the File menu, the open/save dialog opens to the directory specified in ‘Default Directory’, rather than to the directory where the extant file is currently located. If it is saved/renamed there, the file is both renamed and moved to the default directory

    Steps to Reproduce: Open file. Choose File > Rename.

    Expected behavior: File dialog would open in directory where currently open file is located.

    Actual behavior: File dialog opens in default directory.

    Debug info:

    Notepad++ v8 (32-bit)
    Build time : Jun 6 2021 - 18:41:52
    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
    Admin mode : OFF
    Local Conf mode : OFF
    Cloud Config : OFF
    OS Name : Windows 10 Enterprise (64-bit)
    OS Version : 2009
    OS Build : 19042.1052
    Current ANSI codepage : 1252
    Plugins : mimeTools.dll NppConverter.dll NppExport.dll NppTextFX.dll

  • @Mike-Harris:

    When I try your steps, I get your expected behavior.
    So I don’t see a problem here.

  • When I set Preferences > Default Directory to some specific directory (e.g. Desktop) I get the actual behavior.
    The Desktop directory is opened for a file being renamed.
    Is it a bug or expected behavior?
    The same behavior was in version 7.9.1.

  • @mere-human

    I would think, since most renaming operations by users are just renaming the file and not moving its location, that this should be considered a bug. The rename operation should not follow the setting in Default Directory.

    Thus it appears I agree with the OP. Sorry I did not notice that he mentioned the preference setting when I first read it.

    But I’ll also say that IMO having Default Directory set to anything other than its default of Follow current document doesn’t seem to have a lot of value. So I’m passing judgement on this “bug” based on not having need for any other setting.

    OP should submit an official issue report on this.

  • By the way, here is the related issue on GitHub:

Log in to reply