Skip to content

Commit

Permalink
[curlpaste] should expand ~/file to /home/kiwi/file, etc., if it should
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiwi committed Feb 17, 2010
1 parent 4926e50 commit e9861b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions curlpaste
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ local LP = {
cleanup(LP)

local function fdata(tbl, file)
if file:match("^~") then
file = file:gsub("^~", os.getenv("HOME"))
end
local fd = assert(io.open(file, "rb"))
local buf = fd:read("*a")
fd:close()
Expand Down

0 comments on commit e9861b8

Please sign in to comment.