Permalink
Browse files

[curlpaste] should expand ~/file to /home/kiwi/file, etc., if it should

  • Loading branch information...
1 parent 4926e50 commit e9861b8aa0cb9bff6974663ee7e57eaaab94f0ba @Kiwi committed Feb 17, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 curlpaste
View
@@ -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()

0 comments on commit e9861b8

Please sign in to comment.