Skip to content

Commit

Permalink
Fixing a long-hanging bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
paultag committed Jun 17, 2012
1 parent 307f220 commit e6f04a6
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 9 deletions.
41 changes: 35 additions & 6 deletions doc/Makefile.in
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
Expand All @@ -18,6 +18,23 @@
# doc/Makefile.am for Fluxbox 0.9 - an X11 Window manager
# Makefile.am for fluxbox/doc
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
Expand Down Expand Up @@ -46,6 +63,11 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
Expand Down Expand Up @@ -200,11 +222,18 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list=''; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man1dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.1[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
Expand Down
24 changes: 23 additions & 1 deletion maintainer/runtests
Expand Up @@ -15,17 +15,39 @@ function assert {
fi
echo "$1 OK"
}
function assert_not {
if [ -e $1 ]; then
echo "ERROR! FILE EXISTS: $1"
exit 1
fi
echo "$1 OK (DNE)"
}

export XDG_CONFIG_HOME=$TESTROOT/testdirl1
export XDG_CONFIG_DIRS=$TESTROOT/testdirg1:$TESTROOT/testdirg2:$TESTROOT/testdirg3

rm $RUNROOT/*
cd $RUNROOT

fbautostart
fbautostart >/dev/null
sleep 1

for x in tdg1.1 tdg1.2 tdg2.1 tdg2.2 tdg3.1 tdg3.2 tdl1.1 tdl1.2; do
assert $x
done

echo "Stage one OK"

cd -

rm $RUNROOT/*
cd $RUNROOT

export XDG_CONFIG_HOME=$XDG_CONFIG_HOME:$TESTROOT/testdirl2
fbautostart >/dev/null
sleep 1

assert_not tdg1.1
assert_not tdg1.2

cd -
2 changes: 1 addition & 1 deletion maintainer/testdirs/testdirl2/autostart/tdg1-1.desktop
@@ -1,3 +1,3 @@
[Desktop Entry]
Name=tdg1.1
Exec=touch tdg1.1
Exec=touch tdg1.1-fake
2 changes: 1 addition & 1 deletion maintainer/testdirs/testdirl2/autostart/tdg1-2.desktop
@@ -1,3 +1,3 @@
[Desktop Entry]
Name=tdg1.2
Exec=touch tdg1.2
Exec=touch tdg1.2-fake
4 changes: 4 additions & 0 deletions src/xdg_parse.cc
Expand Up @@ -121,6 +121,10 @@ void parse_folder( xdg_autostart_map * binaries, std::string folder ) {
parse_file(folder + "/" + ent->d_name);
xdg_autostart_pair r = xdg_autostart_last_parsed();
xdg_parsed_file.clear();
xdg_autostart_map::iterator it = binaries->find(ent->d_name);
if ( it != binaries->end() ) {
binaries->erase(it);
}
binaries->insert(xdg_autostart_pair(ent->d_name, r.second));
} catch ( parser_exception * ex ) {
std::cerr << "Exception parsing " << ent->d_name << std::endl;
Expand Down

0 comments on commit e6f04a6

Please sign in to comment.