mirror of https://github.com/jarun/nnn.git
Compare commits
5 Commits
3ace9de40c
...
3483d27641
Author | SHA1 | Date |
---|---|---|
Oktay Imanzade | 3483d27641 | |
Arun | 5853ac8e48 | |
Martin Ziemer | 28d993a8e8 | |
Arun | 22aa1455a6 | |
KlzXS | 7806d5d371 |
14
Makefile
14
Makefile
|
@ -36,6 +36,8 @@ O_GITSTATUS := 0 # add git status to detail view
|
||||||
O_NAMEFIRST := 0 # print file name first, add uid and guid to detail view
|
O_NAMEFIRST := 0 # print file name first, add uid and guid to detail view
|
||||||
O_RESTOREPREVIEW := 0 # add preview pipe to close and restore preview pane
|
O_RESTOREPREVIEW := 0 # add preview pipe to close and restore preview pane
|
||||||
|
|
||||||
|
T_ICONS := 0 # test if multiple icons options are set and fail
|
||||||
|
|
||||||
# convert targets to flags for backwards compatibility
|
# convert targets to flags for backwards compatibility
|
||||||
ifneq ($(filter debug,$(MAKECMDGOALS)),)
|
ifneq ($(filter debug,$(MAKECMDGOALS)),)
|
||||||
O_DEBUG := 1
|
O_DEBUG := 1
|
||||||
|
@ -97,16 +99,28 @@ endif
|
||||||
ifeq ($(strip $(O_ICONS)),1)
|
ifeq ($(strip $(O_ICONS)),1)
|
||||||
ICONS_INCLUDE = icons-generated-icons-in-term.h
|
ICONS_INCLUDE = icons-generated-icons-in-term.h
|
||||||
CPPFLAGS += -DICONS_IN_TERM -DICONS_INCLUDE=\"$(ICONS_INCLUDE)\"
|
CPPFLAGS += -DICONS_IN_TERM -DICONS_INCLUDE=\"$(ICONS_INCLUDE)\"
|
||||||
|
ifeq ($(strip $(T_ICONS)),1)
|
||||||
|
$(error Choose only one system for icons (O_ICONS, O_NERD or O_EMOJI))
|
||||||
|
endif
|
||||||
|
T_ICONS := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(O_NERD)),1)
|
ifeq ($(strip $(O_NERD)),1)
|
||||||
ICONS_INCLUDE = icons-generated-nerd.h
|
ICONS_INCLUDE = icons-generated-nerd.h
|
||||||
CPPFLAGS += -DNERD -DICONS_INCLUDE=\"$(ICONS_INCLUDE)\"
|
CPPFLAGS += -DNERD -DICONS_INCLUDE=\"$(ICONS_INCLUDE)\"
|
||||||
|
ifeq ($(strip $(T_ICONS)),1)
|
||||||
|
$(error Choose only one system for icons (O_ICONS, O_NERD or O_EMOJI))
|
||||||
|
endif
|
||||||
|
T_ICONS := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(O_EMOJI)),1)
|
ifeq ($(strip $(O_EMOJI)),1)
|
||||||
ICONS_INCLUDE = icons-generated-emoji.h
|
ICONS_INCLUDE = icons-generated-emoji.h
|
||||||
CPPFLAGS += -DEMOJI -DICONS_INCLUDE=\"$(ICONS_INCLUDE)\"
|
CPPFLAGS += -DEMOJI -DICONS_INCLUDE=\"$(ICONS_INCLUDE)\"
|
||||||
|
ifeq ($(strip $(T_ICONS)),1)
|
||||||
|
$(error Choose only one system for icons (O_ICONS, O_NERD or O_EMOJI))
|
||||||
|
endif
|
||||||
|
T_ICONS := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(O_QSORT)),1)
|
ifeq ($(strip $(O_QSORT)),1)
|
||||||
|
|
|
@ -4732,7 +4732,7 @@ next:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int fd = open(path, O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR); /* Forced create mode for files */
|
int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR); /* Forced create mode for files */
|
||||||
|
|
||||||
if (fd == -1 && errno != EEXIST) {
|
if (fd == -1 && errno != EEXIST) {
|
||||||
DPRINTF_S("open!");
|
DPRINTF_S("open!");
|
||||||
|
|
Loading…
Reference in New Issue