Go to file
Theo Buehler ea6af13127 mkdirp: do not throw an error if directory exists
If I restart i3 4.10.2 twice, e.g. with

$ i3-msg restart; sleep 3; i3-msg restart

the second time I get the following two errors:

05/22/15 10:46:03 - ERROR: mkdir(/tmp/i3-theo.toAK7N) failed: File exists
05/22/15 10:46:03 - ERROR: Could not create "/tmp/i3-theo.toAK7N" for storing the restart layout, layout will be lost.

The first one is from mkdirp() in src/ipc.c and the second one is from
store_restart_layout() in src/util.c.

Notice that I do _not_ get the ``open()'' or ``Could not write restart layout to
...'' error messages, so the layout writing code after line 260 in
store_restart_layout() succeeded and the layout isn't actually lost.  Thus,
these error messages are a bit misleading, especially the second one (which is
triggered by the failure of mkdirp()).

POSIX says about `mkdir -p':

``Each dir operand that names an existing directory shall be ignored without
error.''

Therefore, I suggest the following simple patch that makes mkdirp() succeed if
the named file exists and actually is a directory.  This silences the second
error as well.
2015-05-23 13:12:18 +02:00
contrib contrib: add per-workspace-layout.pl 2014-01-26 16:51:32 +01:00
debian debian: update changelog 2015-04-16 09:08:46 +02:00
docs Merge pull request #1706 from Airblader/feature-docs-5 2015-05-18 21:46:47 +02:00
i3-config-wizard Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3-dump-log Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3-input Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3-msg Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3-nagbar Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3bar Merge pull request #1700 from mh21/tray-icon-size-cleanup 2015-05-12 22:44:08 +02:00
include Merge pull request #1698 from Airblader/feature-1696 2015-05-17 15:02:50 +02:00
libi3 mkdirp: do not throw an error if directory exists 2015-05-23 13:12:18 +02:00
man release i3 4.10.2 2015-04-16 09:02:58 +02:00
parser-specs Merge pull request #1706 from Airblader/feature-docs-5 2015-05-18 21:46:47 +02:00
src Merge pull request #1698 from Airblader/feature-1696 2015-05-17 15:02:50 +02:00
testcases Merge pull request #1698 from Airblader/feature-1696 2015-05-17 15:02:50 +02:00
.clang-format clang-format: don’t define ForeachMacros 2014-06-19 11:17:46 +02:00
.gitignore Rebuild version.o when version.c or LAST_VERSION change 2015-04-12 12:31:58 -04:00
.travis.yml travis: remove FORTIFY_SOURCE, causes trouble with clang 2015-03-29 17:20:11 +02:00
common.mk Respect EXEC_PREFIX and a users' choice of PKG_CONFIG. 2015-04-12 17:59:30 -07:00
CONTRIBUTING.md contributing: mention that we cannot support closed-source software 2015-04-19 21:11:22 +02:00
DEPENDS make AnyEvent::I3 dependency versioned (Thanks sur5r) 2014-08-05 11:49:16 +02:00
generate-command-parser.pl Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3-dmenu-desktop Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3-migrate-config-to-v4 degendered terms 2015-03-11 21:41:43 -07:00
i3-save-tree Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
i3-sensible-editor Use command -v (built-in) instead of which(1) (Thanks val) 2014-10-23 23:05:01 +02:00
i3-sensible-pager Use command -v (built-in) instead of which(1) (Thanks val) 2014-10-23 23:05:01 +02:00
i3-sensible-terminal i3-sensible-terminal: launch i3-nagbar when no terminal is found 2015-03-26 09:21:40 +01:00
i3-with-shmlog.xsession.desktop enable shmlog when invoked as i3-with-shmlog, install symlink + .desktop file 2014-01-04 12:18:45 +01:00
i3.applications.desktop Add 'NoDisplay=true' to i3.application.desktop 2013-06-12 19:47:57 +02:00
i3.config degendered terms 2015-03-11 21:41:43 -07:00
i3.config.keycodes Config: use default system monospace 2015-02-21 17:34:26 -05:00
i3.xsession.desktop set DesktopNames (which gdm uses) (Thanks Yves-Alexis) 2014-10-23 23:18:15 +02:00
LICENSE remove obsolete CMDMODE and TODO files, update LICENSE 2011-10-08 15:18:04 +01:00
logo.svg s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
Makefile Rebuild version.o when version.c or LAST_VERSION change 2015-04-12 12:31:58 -04:00
PACKAGE-MAINTAINER Introduce the i3-sensible-{pager,editor,terminal} scripts 2011-09-25 18:46:37 +01:00
pseudo-doc.doxygen s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
RELEASE-NOTES-4.10.2 release i3 4.10.2 2015-04-16 09:02:58 +02:00
release.sh Adapt release.sh to update the latest version in the debugging docs. 2015-04-20 19:17:42 +02:00