Skip to content

Commit

Permalink
Fix bug in directory creation
Browse files Browse the repository at this point in the history
I should’ve tested this before I released it.
  • Loading branch information
s0ph0s-dog committed Nov 24, 2024
1 parent dc73e39 commit 51d3660
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configure here
VERSION := 1.1
VERSION := 1.1.1
REDBEAN_VERSION := 3.0beta
OUTPUT := werehouse.com
SRV_DIR := srv
Expand Down Expand Up @@ -117,6 +117,9 @@ CSSO_PATH := $(shell which csso)

build: $(OUTPUT)

release: build
cp $(OUTPUT) $(patsubst %.com,%-$(VERSION).com,$(OUTPUT))

# This is below build so that build is still the default target.
include Makefile.secret

Expand All @@ -135,7 +138,7 @@ check-format:
format:
stylua src lib test

.PHONY: build clean check check-format test format
.PHONY: build clean check check-format test format release

# Don't delete any of these if make is interrupted
.PRECIOUS: $(SRV_DIR)/. $(SRV_DIR)%/.
Expand Down
2 changes: 1 addition & 1 deletion lib/db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ local queries = {

local function mkdir()
local ok, err = unix.mkdir("./" .. DB_DIR, 0700)
if not ok and err == unix.EEXIST then
if not ok and err and err:errno() == unix.EEXIST then
return true
elseif not ok then
return nil, err
Expand Down

0 comments on commit 51d3660

Please sign in to comment.