Commit cde91d3
[fs][INTERNAL] Resource#clone: Omit project association
When cloning a Resource, the new Resource instance should not be
associated with any project. This allows for use cases where a resource
is copied from one project to another.
The problematic behavior was introduced with
SAP/ui5-fs#448 and motivated by the need of the
memory adapter to clone resources while keeping the project association.
However, since memory adapters are always assigned a project, they can
easily just assign that project to the cloned resource. This has been
implemented in this PR.1 parent f01019e commit cde91d3
File tree
3 files changed
+16
-15
lines changed- packages/fs
- lib
- adapters
- test/lib
3 files changed
+16
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | 328 | | |
333 | 329 | | |
334 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
48 | 59 | | |
49 | 60 | | |
50 | 61 | | |
| |||
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
112 | | - | |
| 123 | + | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | 351 | | |
357 | 352 | | |
358 | 353 | | |
| |||
362 | 357 | | |
363 | 358 | | |
364 | 359 | | |
365 | | - | |
366 | | - | |
| 360 | + | |
367 | 361 | | |
368 | 362 | | |
369 | 363 | | |
| |||
0 commit comments