• Shadow@lemmy.ca
    link
    fedilink
    English
    arrow-up
    10
    ·
    14 days ago

    Same shit happens with notepad in windows when editing the hosts file.

    • MisterD@lemmy.ca
      link
      fedilink
      English
      arrow-up
      3
      ·
      13 days ago

      Notepad++ handles this gracefully

      It offers to relaunch itself elevated without losing what you just edited.

    • madthumbs@lemmy.worldOPM
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      7
      ·
      edit-2
      14 days ago

      You’re right, some AI chat told me it wouldn’t even open (by default). But at least it has a decent suggested solution in the error.

      • theunknownmuncher@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        14 days ago

        Kudos for being willing to try it and see!

        One very minor detail to note, in your test you weren’t actually overwriting the original file that you opened, but instead Notepad appended a .txt to the filename, which is its default behavior, but you still got the same type or error because you didn’t have write permission for any file in that directory.

      • lud@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        13 days ago

        It’s so stupid that it can’t bring open an UAC prompt instead. Come on Windows you have a standardized way to elevate! Why don’t you use it?