It means neglecting one's urgent and vital task and dealing with trivial things instead. To quote the authority (Politis): επί των αμελούντων των αναγκαίων και σπουδαίων έργων, ασχολουμένων δε παρά καιρόν με επουσιώδη, ως ο εν ημέρα τελέσεως γάμων μεταβαίνων εις το δάσος προς συλλογήν καυσοξύλων (Π.Π., αφίνω 4).
I am afraid there is nothing ambiguous with this phrase. The meaning is exactly the one Nikos Sarantakos mentioned.