Skip to content

Commit

Permalink
Use the same quotation for all the strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lefcha committed Feb 22, 2012
1 parent befefb5 commit 239435b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/auxiliary.lua
Expand Up @@ -2,7 +2,7 @@

function form_date(days)
_check_required(days, 'number')
return os.date("%d-%b-%Y", os.time() - days * 60 * 60 * 24)
return os.date('%d-%b-%Y', os.time() - days * 60 * 60 * 24)
end


Expand All @@ -26,7 +26,7 @@ function pipe_to(command, data)
_check_required(command, 'string')
_check_required(data, 'string')

f = ifsys.popen(command, "w")
f = ifsys.popen(command, 'w')
ifsys.write(f, data)

return ifsys.pclose(f)
Expand All @@ -35,7 +35,7 @@ end
function pipe_from(command)
_check_required(command, 'string')

f = ifsys.popen(command, "r")
f = ifsys.popen(command, 'r')
local string = ''
while true do
s = ifsys.read(f)
Expand Down
6 changes: 3 additions & 3 deletions src/mailbox.lua
Expand Up @@ -405,13 +405,13 @@ function Mailbox._fetch_fields(self, fields, messages)
if r == false then break end

if field ~= nil then
field = string.gsub(field, "\r\n\r\n$", "\n")
field = string.gsub(field, '\r\n\r\n$', '\n')
results[m] = results[m] .. field
if options.cache == true then self[m]._fields[f] = field end
end
end
end
results[m] = string.gsub(results[m], "\n$", "")
results[m] = string.gsub(results[m], '\n$', '')
end

if options.close == true then self._cached_close(self) end
Expand Down Expand Up @@ -951,7 +951,7 @@ function Mailbox.match_field(self, field, pattern, messages)
if #mesgs == 0 or fields == nil then return Set({}) end
local results = {}
for m, f in pairs(fields) do
if regex_search(pattern, (string.gsub(f, "^[^:]*: ?(.*)$", "%1"))) then
if regex_search(pattern, (string.gsub(f, '^[^:]*: ?(.*)$', '%1'))) then
table.insert(results, {self, m})
end
end
Expand Down

0 comments on commit 239435b

Please sign in to comment.