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
At some point, I defined a WSAData struct in my BNDB. I then realized the actual official spelling is WSADATA, so I renamed it accordingly.
Now there's an issue: My branch now has structs/WSAData.toml and structs/WSADATA.toml.
I actually discovered this by accident while manually checking out my branch on Windows. Turns out, Git doesn't take that well:
$ git statusOn branch binsync/alexrpYour branch is up to date with 'origin/binsync/alexrp'.Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: structs/WSAData.tomlno changes added to commit (use "git add" and/or "git commit -a")
$ git diffdiff --git a/structs/WSAData.toml b/structs/WSAData.tomlindex 61e32ea..325a057 100644--- a/structs/WSAData.toml+++ b/structs/WSAData.toml@@ -1,7 +1,7 @@ [metadata]-name = "WSAData"+name = "WSADATA" size = 0x198-last_change = 2023-06-03T18:25:10.334537Z+last_change = 2023-06-03T18:25:23.292992Z [members.0x0] name = "wVersion"
(Git confuses the two files because Windows is case-insensitive.)
Steps to reproduce the bug
Add a struct with one casing.
Rename it to a different casing.
Environment
Binary Ninja 3.5.4315-dev Personal (8ff26e7e)
Additional context
No response
The text was updated successfully, but these errors were encountered:
It seems like BinSync should (if possible?) detect and handle renames such as this.
Additionally, rename aside, it's of course perfectly legitimate to actually have two structs called WSAData and WSADATA at the same time. To prevent issues on Windows, might it make sense for BinSync to save structs as structs/<sha1 of name>.toml or something?
Lol, so that's why you don't rely on the filesystem... This will be rough to fix. We could possibly name everything in lowercase, and if you make something with a different case name we could append some info to it... yikes. If we so the sha256 method, than it becomes hard to find which file you need to edit to fix your struct.
As you know though, just for fixing your case now, you can always edit the Git repo, delete the other struct, commit, and push.
mahaloz
changed the title
Leftover struct after rename with case change (WSAData -> WSADATA)
Struct name files are case sensitive (WSAData -> WSADATA)
Jun 5, 2023
Description
At some point, I defined a
WSAData
struct in my BNDB. I then realized the actual official spelling isWSADATA
, so I renamed it accordingly.Now there's an issue: My branch now has
structs/WSAData.toml
andstructs/WSADATA.toml
.I actually discovered this by accident while manually checking out my branch on Windows. Turns out, Git doesn't take that well:
(Git confuses the two files because Windows is case-insensitive.)
Steps to reproduce the bug
Environment
Binary Ninja 3.5.4315-dev Personal (8ff26e7e)
Additional context
No response
The text was updated successfully, but these errors were encountered: