Fix regression in device.unpack
This commit is contained in:
1 parent
8b1f046a3f
commit
3f3fbd81d0
3 files changed
+83
-4
No files matched your search
+5
-3
@@ -140,7 +140,7 @@ export function unpack(
|
||||
if (deviceData.attributes.has(p, revision)) allMatches.push(p);
|
||||
|
||||
for (let i = path.length - 1; i >= 0; --i) {
|
||||
if (path.alias & (i << i)) {
|
||||
if (path.alias & (1 << i)) {
|
||||
for (const [param, val] of path.segments[i] as [Path, string][]) {
|
||||
const p = wildcardPath.slice(0, i + 1).concat(param);
|
||||
const unpacked = unpack(deviceData, p, revision);
|
||||
@@ -156,11 +156,13 @@ export function unpack(
|
||||
) {
|
||||
for (let m = 0; m < allMatches.length; ++m) {
|
||||
let k;
|
||||
const match = allMatches[m];
|
||||
if (!match) continue;
|
||||
for (k = i; k >= 0; --k)
|
||||
if (allMatches[m].segments[k] !== up.segments[k]) break;
|
||||
if (match.segments[k] !== up.segments[k]) break;
|
||||
|
||||
if (k < 0) {
|
||||
filtered.push(allMatches[m]);
|
||||
filtered.push(match);
|
||||
allMatches[m] = null;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2139,7 +2139,7 @@ function processInstances(
|
||||
defer: boolean
|
||||
): void {
|
||||
parent = sessionContext.deviceData.paths.add(parent);
|
||||
let instancesToCreate, instancesToDelete;
|
||||
let instancesToCreate: InstanceSet, instancesToDelete: Set<Path>;
|
||||
if (parent.segments[0] === "Downloads") {
|
||||
if (parent.length !== 1) return;
|
||||
instancesToDelete = sessionContext.syncState.downloadsToDelete;
|
||||
|
||||
Reference in new issue
Block a user