mirror of
https://github.com/kepler155c/opus
synced 2025-01-12 00:30:27 +00:00
1.12 fixes
This commit is contained in:
parent
3dd351cc86
commit
8db4fed19a
@ -1,13 +1,17 @@
|
|||||||
--[[
|
--[[
|
||||||
Mount a readonly file system from another computer across rednet. The
|
Mount a readonly file system from another computer across rednet. The
|
||||||
target computer must be running OpusOS or redserver.
|
target computer must be running OpusOS or redserver. Dissimlar to samba
|
||||||
|
in that a snapshot of the target is taken upon mounting - making this
|
||||||
|
faster.
|
||||||
|
|
||||||
|
Useful for mounting a non-changing directory tree.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
rn://<id>/directory/subdir
|
rttp://<id>/directory/subdir
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
rn://12/usr/etc
|
rttp://12/usr/etc
|
||||||
rn://8/usr
|
rttp://8/usr
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
local rttp = require('rttp')
|
local rttp = require('rttp')
|
||||||
|
@ -51,7 +51,7 @@ function urlfs.open(node, fn, fl)
|
|||||||
|
|
||||||
local c = node.cache
|
local c = node.cache
|
||||||
if not c then
|
if not c then
|
||||||
if node.url:match('^([%w][%w%+%-%.]*)%:') == 'rn' then
|
if node.url:match("^(rttps?:)") then
|
||||||
local s, response = rttp.get(node.url)
|
local s, response = rttp.get(node.url)
|
||||||
c = s and response.statusCode == 200 and response.data
|
c = s and response.statusCode == 200 and response.data
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user