pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[pulsar-next] Renaming a file in the tree-view makes the file lose the name

Open mauricioszabo opened this issue 1 year ago • 2 comments

Thanks in advance for your bug report!

  • [X] Have you reproduced issue in safe mode?
  • [X] Have you used the debugging guide to try to resolve the issue?
  • [X] Have you checked our FAQs to make sure your question isn't answered there?
  • [X] Have you checked to make sure your issue does not already exist?
  • [X] Have you checked you are on the latest release of Pulsar?

What happened?

In newest electron branch, renaming an open file in tree-view causes weird behavior: the file in the editor gets the name untitled, and can't be saved (it'll cause an exception).

If I rename the file outside the editor, it disappears from tree-view, and it'll not change the file in the editor (but it'll stay in the editor, as unsaved, with the old name).

Pulsar version

1.122.2024112215 (new Electron branch)

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

22.04

Which CPU architecture are you running this on?

x86_64/AMD64

What steps are needed to reproduce this?

  1. mkdir /tmp/something
  2. touch /tmp/something/file.py
  3. pulsar /tmp/something
  4. Open file.py, add some contents, and save
  5. Rename file.py to afile.py with the tree-view

In this case, the file in the editor will be called untitled, lose all syntax highlight, and trying to save it will cause an ENOENT exception (visible only at the devtools)

OR, case 2:

  1. Repeat steps 1-4
  2. In a terminal, mv /tmp/something/file.py /tmp/something/other.py

In this case, the file in the editor will stay as file.py, and it'll disappear from the tree-view (and other.py won't also appear at the tree-view).

In the editor, file.py will be marked as modified, and saving it will create the file.py again.

Additional Information:

No response

mauricioszabo avatar Nov 25 '24 20:11 mauricioszabo

I believe I've fixed this in caf9795cc0353d39eac8f660467e411bc63a241d, but I'll keep this ticket open until I get confirmation from @mauricioszabo.

savetheclocktower avatar Nov 28 '24 23:11 savetheclocktower

Pinging @mauricioszabo — feels like this has to have been fixed, right?

savetheclocktower avatar Apr 22 '25 23:04 savetheclocktower