New York restaurants win right to stay open after state clos