@@ -97,6 +97,15 @@ function getFsNode(fs, parent, fsc, path, mode)
97
97
n [k + 1 ] = {nm , function () return nil , getFsNode (fs , t , fsc , fp , mode ) end }
98
98
end
99
99
end
100
+ if not dir then
101
+ table.insert (n , {" Copy" , function ()
102
+ local rt , re = require (" sys-filewrap" ).create (fsc , path , false )
103
+ if not rt then
104
+ return false , dialog (" Open Error: " .. tostring (re ), parent )
105
+ end
106
+ return nil , setupCopyVirtualEnvironment (fs , parent , rt , path :match (" [^/]*$" ) or " " )
107
+ end })
108
+ end
100
109
if fscrw then
101
110
if dir then
102
111
table.insert (n , {" Mk. Directory" , function ()
@@ -114,31 +123,6 @@ function getFsNode(fs, parent, fsc, path, mode)
114
123
end
115
124
}
116
125
end })
117
- else
118
- if mode ~= nil then
119
- local tx = " Open"
120
- if mode == true then
121
- tx = " Save"
122
- elseif mode == " append" then
123
- tx = " Append"
124
- end
125
- if fscrw or mode == false then
126
- table.insert (n , {tx , function ()
127
- local rt , re = require (" sys-filewrap" ).create (fsc , path , mode )
128
- if not rt then
129
- return false , dialog (" Open Error: " .. tostring (re ), parent )
130
- end
131
- return true , rt
132
- end })
133
- end
134
- end
135
- table.insert (n , {" Copy" , function ()
136
- local rt , re = require (" sys-filewrap" ).create (fsc , path , false )
137
- if not rt then
138
- return false , dialog (" Open Error: " .. tostring (re ), parent )
139
- end
140
- return nil , setupCopyVirtualEnvironment (fs , parent , rt , path :match (" [^/]*$" ) or " " )
141
- end })
142
126
end
143
127
if path ~= " /" then
144
128
local delText = " Delete"
@@ -172,6 +156,23 @@ function getFsNode(fs, parent, fsc, path, mode)
172
156
end })
173
157
end
174
158
end
159
+ if (fscrw or mode == false ) and mode ~= nil then
160
+ local tx = " Open"
161
+ if mode == true then
162
+ tx = " Save"
163
+ elseif mode == " append" then
164
+ tx = " Append"
165
+ end
166
+ if fscrw or mode == false then
167
+ table.insert (n , {tx , function ()
168
+ local rt , re = require (" sys-filewrap" ).create (fsc , path , mode )
169
+ if not rt then
170
+ return false , dialog (" Open Error: " .. tostring (re ), parent )
171
+ end
172
+ return true , rt
173
+ end })
174
+ end
175
+ end
175
176
return n
176
177
end ,
177
178
unknownAvailable = dir and (mode ~= nil ) and ((mode == false ) or fscrw ),
0 commit comments