[bug] strange behaviour when working on virtual drives mapped to directories · Issue #512 · focus-editor/focus · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Focus deletes work done when opening from focus.exe into virtual drive and having the x.focus-config project file looking at the directory associated (it also deletes work done when doing this the opposite way).
To Reproduce
Steps to reproduce the behavior:
In cmd.exe do: subst [letter]: C:[directory] to create a virtual drive associated with a directory (don't worry, this only stays until the computer is turned off and you can also delete it with subst /D [letter])
Open focus.exe
Copy the "Example Project.focus-config" onto a new file
On build_working_dir, start the full path using the virtual drive and set a preferred error_regex
Switch to that project
Using ctrl-o, open a file in the directory with the associated virtual drive
Edit the file slightly (or a lot, whatever)
Use the build command and jump to the first error
You will go back to the previous file contents
If you now do ctrl-tab, you should see two files which are named the same, but one's full path is from the virtual drive and the other from the physical drive
If you repeat from step 7, this should happen again in some way
note that the changed text is a bit strange, I'm not sure what it depends on but you need to compile and go to the error to have it happen.
What happened to me exactly, were a couple name changes that I did, I needed to do them 2 or 3 times since the editor would overwrite the text in some way each time I did steps 7 and 8, it did work after a couple times, but I'm not sure which filepath I edited (the file from the virtual drive or the file from the physical drive) to have the text not get overwritten.
OS: Windows: 11
Focus Version: focus-nightly-7e88514 Expected behavior
File data to not be overwritten by old file data in this context.
Additional context
To be fair, this was a mistake on my part when I opened the file using the physical drive instead of the virtual one, but I thought it would be fine.
The text was updated successfully, but these errors were encountered:
Just to clarify, at step 7 you don't save the file?
Focus currently has no way of knowing that 2 different paths point to the same underlying file. Being able to detect and handle that is a significant piece of work which involves redesigning the buffer system a litte.
We're a bit tied up with other work right now, but will get to this at some point when we can.
Ah sorry I forgot to mention it before, the file does get saved before building since I have save_all_file_backed_buffers_on_build and save_current_buffer_on_build in global.focus-config set to true.
I understand it's also a very specific issue and also a windows specific one too. It's also something that doesn't really get in the way most of the time so it's fine to keep the issue until there is less work to be done.
Describe the bug
Focus deletes work done when opening from focus.exe into virtual drive and having the x.focus-config project file looking at the directory associated (it also deletes work done when doing this the opposite way).
To Reproduce
Steps to reproduce the behavior:
note that the changed text is a bit strange, I'm not sure what it depends on but you need to compile and go to the error to have it happen.
What happened to me exactly, were a couple name changes that I did, I needed to do them 2 or 3 times since the editor would overwrite the text in some way each time I did steps 7 and 8, it did work after a couple times, but I'm not sure which filepath I edited (the file from the virtual drive or the file from the physical drive) to have the text not get overwritten.
Expected behavior
File data to not be overwritten by old file data in this context.
Additional context
To be fair, this was a mistake on my part when I opened the file using the physical drive instead of the virtual one, but I thought it would be fine.
The text was updated successfully, but these errors were encountered: