Permalink
Browse files

Handle file not found errors gracefully

  • Loading branch information...
1 parent 763331a commit fe42428a53384f70b4e9671c7cea1b3670525beb @lukec committed Dec 11, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 ometastore.ml
View
@@ -232,7 +232,8 @@ let fix_usergroup e =
try
out "%s: set owner/group to %S %S\n" e.path e.owner e.group;
chown e.path (getpwnam e.owner).pw_uid (getgrnam e.group).gr_gid;
- with Unix_error _ -> ( out "chown failed: %s\n" e.path )
+ with | Unix_error _ -> ( out "chown failed: %s\n" e.path )
+ | Not_found -> ( out "File is missing: %s\n" e.path )
let fix_xattrs src dst =
out "%s: fixing xattrs (" src.path;

0 comments on commit fe42428

Please sign in to comment.