dotsync 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/lib/dotsync/actions/pull_action.rb +8 -19
- data/lib/dotsync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c3cafce147e8573ff819e662666f78cd1d2cb7a2735c112cddcfccad00238a0
|
|
4
|
+
data.tar.gz: aa9e6385afc45546411af829bd269808ca4f6539bdb50153147ba86498c22e12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4bd02887f8602282d62f40cedd9e969122861275428751d4056a6bc83beda5ef4ce1ee9574dd1ee71744148378c7b294281b6029c11440104fd990ba150e612a
|
|
7
|
+
data.tar.gz: 3278ed54194865ed62296a0976e2e468f0248716342b27c53971207fe2ebcb2a6634af225dabd68943e7300dd9aed3dc075ceaed78000580dfa3142d28ed30ae
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [0.4.3] - 2026-03-22
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- Fix backup to respect `only`/`ignore` filters via FileTransfer reuse (#37)
|
|
6
|
+
- Backup no longer copies entire destination directories — only files matching sync filters are backed up
|
|
7
|
+
- Fixes `Permission denied` crash when destination contains restricted files (e.g. `.git/objects`) outside the filter
|
|
8
|
+
- Removes `cp_r_regular_files` in favor of reusing `FileTransfer` with a backup mapping
|
|
9
|
+
|
|
1
10
|
## [0.4.2] - 2026-03-22
|
|
2
11
|
|
|
3
12
|
### Fixed
|
data/Gemfile.lock
CHANGED
|
@@ -62,30 +62,19 @@ module Dotsync
|
|
|
62
62
|
if File.file?(mapping.src)
|
|
63
63
|
FileUtils.cp(mapping.dest, backup_path)
|
|
64
64
|
else
|
|
65
|
-
|
|
65
|
+
backup_mapping = Dotsync::Mapping.new(
|
|
66
|
+
"src" => mapping.dest,
|
|
67
|
+
"dest" => backup_path,
|
|
68
|
+
"only" => mapping.original_only,
|
|
69
|
+
"ignore" => mapping.original_ignores,
|
|
70
|
+
"force" => false
|
|
71
|
+
)
|
|
72
|
+
Dotsync::FileTransfer.new(backup_mapping).transfer
|
|
66
73
|
end
|
|
67
74
|
end
|
|
68
75
|
true
|
|
69
76
|
end
|
|
70
77
|
|
|
71
|
-
# Recursively copy a directory, skipping sockets, FIFOs, and device files.
|
|
72
|
-
# FileUtils.cp_r fails on macOS when socket paths exceed the 104-byte limit.
|
|
73
|
-
def cp_r_regular_files(src, dest)
|
|
74
|
-
FileUtils.mkdir_p(dest)
|
|
75
|
-
Dir.each_child(src) do |entry|
|
|
76
|
-
src_entry = File.join(src, entry)
|
|
77
|
-
dest_entry = File.join(dest, entry)
|
|
78
|
-
if File.symlink?(src_entry)
|
|
79
|
-
FileUtils.rm_f(dest_entry)
|
|
80
|
-
FileUtils.ln_s(File.readlink(src_entry), dest_entry)
|
|
81
|
-
elsif File.directory?(src_entry)
|
|
82
|
-
cp_r_regular_files(src_entry, dest_entry)
|
|
83
|
-
elsif File.file?(src_entry)
|
|
84
|
-
FileUtils.cp(src_entry, dest_entry, preserve: true)
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
|
|
89
78
|
def purge_old_backups
|
|
90
79
|
backups = Dir[File.join(backups_root, "*")].sort.reverse
|
|
91
80
|
if backups.size > 10
|
data/lib/dotsync/version.rb
CHANGED