File tree 1 file changed +16
-7
lines changed
1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ local link_rewrites = {
32
32
[" ../contrib/config-deployment/wfx.workflow.config.deployment.yml" ] = " https://github.com/siemens/wfx/tree/main/contrib/config-deployment/wfx.workflow.config.deployment.yml" ,
33
33
[" ../contrib/config-deployment/README.md" ] = " https://github.com/siemens/wfx/tree/main/contrib/config-deployment" ,
34
34
[" ../contrib/config-deployment/client/worker.go" ] = " https://github.com/siemens/wfx/tree/main/contrib/config-deployment/client/worker.go" ,
35
+ [" ../fbs" ] = " https://github.com/siemens/wfx/tree/main/fbs" ,
36
+ [" ../example/plugin" ] = " https://github.com/siemens/wfx/tree/main/example/plugin" ,
35
37
}
36
38
37
39
local function find_git_root ()
@@ -50,18 +52,25 @@ local function copy_file(from, to)
50
52
if not f then
51
53
error (string.format (" ERROR: source %s does not exist" , from ))
52
54
end
55
+
56
+ local block = f :read (4096 )
57
+ if not block then
58
+ logging .info (" Skipping " , from , " because it is not a readable file" )
59
+ f :close ()
60
+ return
61
+ end
62
+
63
+
53
64
local t = io.open (to , " wb" )
54
65
if not t then
55
- error (string.format (" ERROR: destination %s does not exist " , to ))
66
+ error (string.format (" ERROR: Cannot create destination %s" , to ))
56
67
end
57
68
58
- while true do
59
- local block = f :read (4096 )
60
- if not block then
61
- break
62
- end
69
+ repeat
63
70
t :write (block )
64
- end
71
+ block = f :read (4096 )
72
+ until block == nil
73
+
65
74
f :close ()
66
75
t :close ()
67
76
end
You can’t perform that action at this time.
0 commit comments