diff --git a/modules/erl/d_lan_db.erl b/modules/erl/d_lan_db.erl index 4ea2abdc..3cf89f3f 100644 --- a/modules/erl/d_lan_db.erl +++ b/modules/erl/d_lan_db.erl @@ -104,14 +104,18 @@ loop() -> receive {new_download, Filename} -> Date = now_utc(), - case dets:lookup(?DB_DOWNLOADS_COUNT, {Filename, Date}) of - [] -> - dets:insert(?DB_DOWNLOADS_COUNT, [{{Filename, Date}, 1}]), - loop(); - [{_, N}] -> - dets:insert(?DB_DOWNLOADS_COUNT, [{{Filename, Date}, N + 1}]), - loop() - end; + try + case dets:lookup(?DB_DOWNLOADS_COUNT, {Filename, Date}) of + [] -> + dets:insert(?DB_DOWNLOADS_COUNT, [{{Filename, Date}, 1}]); + [{_, N}] -> + dets:insert(?DB_DOWNLOADS_COUNT, [{{Filename, Date}, N + 1}]) + end + catch + Exception -> + io:format("An exception has occured when inserting a download count: ~p~n", [Exception]) + end, + loop(); stop -> ok end. diff --git a/tools/deploy.sh b/tools/deploy.sh index 4d77aaf3..cc4dcb1c 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -23,7 +23,7 @@ cd .. mkdir $TARGET/db # Yaws should have the permission to write in this folder. rsync $RSYNC_OPTS colorbox $TARGET -rsync $RSYNC_OPTS files $TARGET --exclude '*.*' +rsync $RSYNC_OPTS files $TARGET --include '*.svg' --exclude '*.*' rsync $RSYNC_OPTS img $TARGET rsync $RSYNC_OPTS modules/ebin $TARGET/modules/ rsync $RSYNC_OPTS modules/include $TARGET/modules/