Commit 7cb711c
committed
Write file reference with correct capitalisation
When dragging a file from Solution Explorer into the Managed Resources editor, the file path is written to the `.resx` file in lower case.
This is because the "drop data" provided by Solution Explorer contains a lower-case path (both for SDK-style and legacy projects).
To fix this, we walk the path, using `Path.EnumerateFileSystemEntries` to produce a correctly cased path for the file being dragged. Unfortunately there's no better way I could find to achieve this. I tried quite a few different approaches and this seemed like the least rubbish. The approach used in `GetFileNameInActualCase` elsewhere in the resource editor only handles the file name, not any directories above it.1 parent 436bc57 commit 7cb711c
File tree
1 file changed
+25
-1
lines changed- src/Microsoft.VisualStudio.Editors/ResourceEditor
1 file changed
+25
-1
lines changedLines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3053 | 3053 | | |
3054 | 3054 | | |
3055 | 3055 | | |
3056 | | - | |
| 3056 | + | |
3057 | 3057 | | |
3058 | 3058 | | |
3059 | 3059 | | |
| |||
3069 | 3069 | | |
3070 | 3070 | | |
3071 | 3071 | | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
3072 | 3096 | | |
3073 | 3097 | | |
3074 | 3098 | | |
| |||
0 commit comments