Commit cb31af7
committed
winsymlinks: add a mode preferring native symlinks with a deepcopy fallback
When native symlinks are available, it is a shame to create deep copies
by default.
However, since there are many scenarios where symlinks are not available
(e.g. when running on FAT, or on older Windows versions, or when
Developer Mode is not enabled), we've got to have a fallback.
In the regular Cygwin world, it is legitimate to fall back to WSL
symlinks and/or to the system file emulation (where a file is created
that is marked with the "system" attribute and with content that adheres
to a specific, magic form that is recognized specifically by the Cygwin
runtime).
However, in the world of MSYS2, the assumption is that the result of the
operation should be as interoperable with regular Win32 programs as
possible. Hence the default to "deepcopy".
As a "best of both worlds" mode, let's implement one that tries to
create native symlinks by default, and if that fails, uses the
"deepcopy" method as a fallback.
This addresses #113.
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 85bba8e commit cb31af7
4 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2110 | 2110 | | |
2111 | 2111 | | |
2112 | 2112 | | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
2113 | 2116 | | |
2114 | 2117 | | |
2115 | 2118 | | |
| |||
2144 | 2147 | | |
2145 | 2148 | | |
2146 | 2149 | | |
| 2150 | + | |
2147 | 2151 | | |
2148 | 2152 | | |
2149 | 2153 | | |
| |||
2154 | 2158 | | |
2155 | 2159 | | |
2156 | 2160 | | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
2157 | 2167 | | |
2158 | 2168 | | |
2159 | 2169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
144 | 152 | | |
145 | 153 | | |
146 | 154 | | |
| |||
0 commit comments