mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Create static directories at build, not runtime.
Instead of calling lfs.mkdir() to create "./history" and "./screenshots" at runtime it is easier to create them at package build time. I hesitated whether to add "./clipboard" to this list but decided against it as we can perhaps change current directory and then all the code manipulating clipboard would break, so I left it as is.
This commit is contained in:
2
Makefile
2
Makefile
@@ -216,7 +216,7 @@ customupdate: all
|
||||
$(STRIP) --strip-unneeded kpdfview
|
||||
-rm kindlepdfviewer-$(VERSION).zip
|
||||
rm -Rf $(INSTALL_DIR)
|
||||
mkdir $(INSTALL_DIR)
|
||||
mkdir -p $(INSTALL_DIR)/{history,screenshots}
|
||||
echo $(VERSION) > $(INSTALL_DIR)/git-rev
|
||||
cp -p README.md COPYING kpdfview $(LUA_FILES) $(INSTALL_DIR)
|
||||
mkdir $(INSTALL_DIR)/data
|
||||
|
||||
@@ -450,7 +450,6 @@ function FileChooser:addAllCommands()
|
||||
self.commands:add(KEY_L, nil, "L",
|
||||
"show last documents",
|
||||
function(self)
|
||||
lfs.mkdir("./history/")
|
||||
FileHistory:init()
|
||||
FileHistory:choose("")
|
||||
self.pagedirty = true
|
||||
|
||||
@@ -109,7 +109,6 @@ end
|
||||
|
||||
|
||||
function Screen:screenshot()
|
||||
lfs.mkdir("./screenshots")
|
||||
local start = os.clock()
|
||||
--showInfoMsgWithDelay("making screenshot... ", 1000, 1)
|
||||
self:fb2bmp("/dev/fb0", lfs.currentdir().."/screenshots/"..os.date("%Y%m%d%H%M%S")..".bmp", true, nil)
|
||||
|
||||
@@ -30,7 +30,6 @@ end
|
||||
|
||||
function DocSettings:open(docfile)
|
||||
-- history feature moves configuration files into history directory
|
||||
lfs.mkdir("./history")
|
||||
local new = { file = DocToHistory(docfile), data = {} }
|
||||
local ok, stored = pcall(dofile,new.file)
|
||||
if not ok then
|
||||
|
||||
Reference in New Issue
Block a user