Commit 082b0a23 authored by Darin Adler's avatar Darin Adler
Browse files

I am getting a little careless. This must end.

	* libnautilus-extensions/nautilus-file.c:
	(nautilus_file_denies_access_permission): Fixed some checks
	that I had reversed.

	* src/ntl-app.c: (display_caveat): Took out some test code I
	checked in.
parent 88d96d50
2000-05-25 Darin Adler <darin@eazel.com>
I am getting a little careless. This must end.
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_denies_access_permission): Fixed some checks
that I had reversed.
* src/ntl-app.c: (display_caveat): Took out some test code I
checked in.
2000-05-25 Darin Adler <darin@eazel.com>
* libnautilus-extensions/nautilus-file.c:
......
......@@ -348,7 +348,7 @@ nautilus_file_denies_access_permission (NautilusFile *file,
* there be garbage there? What will it do for non-local files?
*/
if (user_id == file->details->info->uid) {
return (file->details->info->permissions & owner_permission) != 0;
return (file->details->info->permissions & owner_permission) == 0;
}
/* No need to free result of getpwuid. */
......@@ -361,11 +361,11 @@ nautilus_file_denies_access_permission (NautilusFile *file,
*/
if (password_info != NULL
&& password_info->pw_gid == file->details->info->gid) {
return (file->details->info->permissions & group_permission) != 0;
return (file->details->info->permissions & group_permission) == 0;
}
/* Other users' access is governed by the other bits. */
return (file->details->info->permissions & other_permission) != 0;
return (file->details->info->permissions & other_permission) == 0;
}
/**
......@@ -1369,6 +1369,7 @@ nautilus_file_can_set_permissions (NautilusFile *file)
return FALSE;
}
/* Check the user. */
user_id = geteuid();
/* Owner is allowed to set permissions. */
......
......@@ -348,7 +348,7 @@ nautilus_file_denies_access_permission (NautilusFile *file,
* there be garbage there? What will it do for non-local files?
*/
if (user_id == file->details->info->uid) {
return (file->details->info->permissions & owner_permission) != 0;
return (file->details->info->permissions & owner_permission) == 0;
}
/* No need to free result of getpwuid. */
......@@ -361,11 +361,11 @@ nautilus_file_denies_access_permission (NautilusFile *file,
*/
if (password_info != NULL
&& password_info->pw_gid == file->details->info->gid) {
return (file->details->info->permissions & group_permission) != 0;
return (file->details->info->permissions & group_permission) == 0;
}
/* Other users' access is governed by the other bits. */
return (file->details->info->permissions & other_permission) != 0;
return (file->details->info->permissions & other_permission) == 0;
}
/**
......@@ -1369,6 +1369,7 @@ nautilus_file_can_set_permissions (NautilusFile *file)
return FALSE;
}
/* Check the user. */
user_id = geteuid();
/* Owner is allowed to set permissions. */
......
......@@ -326,8 +326,6 @@ display_caveat (GtkWindow *parent_window)
gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent_window);
gtk_widget_show (GTK_WIDGET (dialog));
nautilus_warning_dialog ("This is a long test of the very long dialog which is longer than you can believe I say.");
}
void
......
......@@ -326,8 +326,6 @@ display_caveat (GtkWindow *parent_window)
gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent_window);
gtk_widget_show (GTK_WIDGET (dialog));
nautilus_warning_dialog ("This is a long test of the very long dialog which is longer than you can believe I say.");
}
void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment