diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-01-13 16:01:06 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-01-13 16:01:06 +0000 |
commit | c89e42cf158941545540ad4f8e94f478dec50c1a (patch) | |
tree | 5dc51f71a8b6bb7c907ae399e4b77a35a1d6d3c3 /lib/modelfunctions.lua | |
parent | f4bffff49b7eac4e1936344d6dd8fa4d5df8f2b4 (diff) | |
download | acf-core-c89e42cf158941545540ad4f8e94f478dec50c1a.tar.bz2 acf-core-c89e42cf158941545540ad4f8e94f478dec50c1a.tar.xz |
Modified fs.lua to survive nil parameters. Added create_directory and used within create_file and write_file. Reviewed each read_file call to make sure handles nil return value.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/modelfunctions.lua')
-rw-r--r-- | lib/modelfunctions.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/modelfunctions.lua b/lib/modelfunctions.lua index ed92abd..e0d2885 100644 --- a/lib/modelfunctions.lua +++ b/lib/modelfunctions.lua @@ -71,7 +71,7 @@ function getfiledetails(file, validatefilename, validatefiledetails) if success then if fs.is_file(file) then local filedetails = fs.stat(file) - filecontent.value = fs.read_file(file) + filecontent.value = fs.read_file(file) or "" filesize.value = filedetails.size mtime.value = filedetails.mtime else |