Index: src/gestor_acl.cpp =================================================================== --- src/gestor_acl.cpp (.../eiciel_0_8) (revision 34) +++ src/gestor_acl.cpp (.../eiciel_0_8_1) (revision 34) @@ -574,16 +574,26 @@ if (esDir) { - acl_t aclDefault = acl_from_text(textACLDefault.c_str()); - if (aclAccess == NULL) + // Buidem primer la ACL + if (acl_delete_def_file(nomFitxer.c_str()) != 0) { - std::cerr << "Default ACL is wrong!!!" << endl << textACLDefault.c_str() << endl; - throw GestorACLException(_("Default textual representation of the ACL is wrong")); + throw GestorACLException(Glib::locale_to_utf8(strerror(errno))); } - if (acl_set_file(nomFitxer.c_str(), ACL_TYPE_DEFAULT, aclDefault) != 0) + // i si hi ha algo ho posem, aixi evitem problemes amb FreeBSD 5.x + if (textACLDefault.size() > 0) { - throw GestorACLException(Glib::locale_to_utf8(strerror(errno))); + acl_t aclDefault = acl_from_text(textACLDefault.c_str()); + if (aclAccess == NULL) + { + std::cerr << "Default ACL is wrong!!!" << endl << textACLDefault.c_str() << endl; + throw GestorACLException(_("Default textual representation of the ACL is wrong")); + } + + if (acl_set_file(nomFitxer.c_str(), ACL_TYPE_DEFAULT, aclDefault) != 0) + { + throw GestorACLException(Glib::locale_to_utf8(strerror(errno))); + } } } acl_free(aclAccess);