clonefile 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/clonefile/clonefile.c +1 -1
- data/lib/clonefile.rb +10 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 701af6bc1b8fa5263ae5080c8663cbdc58958b657da304ef97d08adfc212d2c7
|
4
|
+
data.tar.gz: 2a75a943a4fb26fd8b825dbac4a47869735d45de439f491ffdffc5d04b3a9701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13bac251475f1f4f99fa51249c4e434b860ab75c9e5bde02be404cadfd45fa4b5217013336df45eec5246a1470c92ad132898da5565511a43bb7d5c1025646d0
|
7
|
+
data.tar.gz: f67ea20ad3a7548faae3db15a8a15d5eff770974aa6a45592369823ce83b9536a855b97f432d11461e26e40939581b5e852fc5c96ae353bd6a8f869eaf6792c8
|
data/ext/clonefile/clonefile.c
CHANGED
data/lib/clonefile.rb
CHANGED
@@ -10,9 +10,16 @@ module Clonefile
|
|
10
10
|
if RUBY_PLATFORM =~ /darwin/
|
11
11
|
darwin_clonefile(src, dest)
|
12
12
|
elsif RUBY_PLATFORM =~ /linux/
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
begin
|
14
|
+
src_fd = IO.sysopen(src, File::RDONLY | File::BINARY)
|
15
|
+
dest_f = File.new(dest, File::WRONLY | File::BINARY | File::CREAT)
|
16
|
+
res = dest_f.ioctl(LINUX_IOCTL_FICLONE, src_fd) == 0
|
17
|
+
ensure
|
18
|
+
(src_f = IO.new(src_fd)) && src_f.close
|
19
|
+
dest_f.close
|
20
|
+
end
|
21
|
+
|
22
|
+
res
|
16
23
|
end
|
17
24
|
end
|
18
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clonefile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Aleksandersen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Copy files using reflink/cloned extents on supported file systems. Supports
|
14
14
|
Linux and macOS.
|
@@ -44,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
requirements:
|
47
|
-
- Linux 4.9.1+ or macOS 10.12.1
|
47
|
+
- Linux 4.9.1+ or macOS 10.12.1+.
|
48
48
|
- " A copy-on-write file system."
|
49
49
|
rubygems_version: 3.1.2
|
50
50
|
signing_key:
|