Skip to content

Commit

Permalink
fix: localToCloud/cloudBackup/twoWay mode deletions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwynr committed Nov 23, 2024
1 parent af64582 commit d0daddf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@filen/sync",
"version": "0.1.83",
"version": "0.1.84",
"description": "Filen Sync",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 2 additions & 4 deletions src/lib/deltas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ export class Deltas {

// Local deletions
if (this.sync.mode === "twoWay" || this.sync.mode === "localToCloud") {
// Only run current/previous comparisons if the sync already has saved state
if (this.sync.mode === "twoWay" && !this.sync.isPreviousSavedTreeStateEmpty) {
if (this.sync.mode === "twoWay") {
for (const path in previousLocalTree.tree) {
if (pathsAdded[path] || erroredLocalPaths[path]) {
continue
Expand Down Expand Up @@ -278,8 +277,7 @@ export class Deltas {

// Remote deletions
if (this.sync.mode === "twoWay" || this.sync.mode === "cloudToLocal") {
// Only run current/previous comparisons if the sync already has saved state
if (this.sync.mode === "twoWay" && !this.sync.isPreviousSavedTreeStateEmpty) {
if (this.sync.mode === "twoWay") {
for (const path in previousRemoteTree.tree) {
if (pathsAdded[path]) {
continue
Expand Down

0 comments on commit d0daddf

Please sign in to comment.