Project

General

Profile

« Previous | Next » 

Revision 3972ec07

Added by François ARMAND about 7 years ago

Fixes #10115: FileNotFoundException when looking for deleted history file

View differences:

inventory-repository/src/main/scala/com/normation/inventory/ldap/core/InventoryHistoryLogRepository.scala
import com.unboundid.ldap.sdk.Entry
import com.unboundid.ldif._
import net.liftweb.common._
import java.io.FileNotFoundException
/**
* A service that write and read ServerAndMachine inventory data to/from file.
......
fromLdapEntries.fromLdapEntries(buf.map(e => new LDAPEntry(e)))
} catch {
case e : LDIFException => Failure(e.getMessage,Full(e),Empty)
case e : FileNotFoundException => Failure(s"History file '${in.getAbsolutePath}' was not found. It was likelly deleted", Full(e), Empty)
} finally {
if(null != reader) reader.close
}

Also available in: Unified diff