A federal magistrate judge in Manhattan has rejected a bid by Barnes & Noble’s former CEO to gain access to documents prepared by the company’s lawyers amid a sexual harassment investigation that led to his ouster.

U.S. Magistrate Judge Gabriel W. Gorenstein on Friday said that the documents, prepared by Barnes & Noble’s general counsel and outside attorneys, were meant to provide legal advice to the company and were thus protected by the attorney-client privilege.