diff options
author | John Sullivan <sullivan@src.gnome.org> | 2000-12-18 21:39:31 +0000 |
---|---|---|
committer | John Sullivan <sullivan@src.gnome.org> | 2000-12-18 21:39:31 +0000 |
commit | cd707d47ba3d9f46fd6479bd37938ef9b564df67 (patch) | |
tree | ddc974fb9441fd16835abf9130bf04ad56f733e7 /libnautilus-private/nautilus-file-utilities.c | |
parent | 7c8d453b1d74b0a9f2f4585012e18a900f0444f1 (diff) | |
download | nautilus-cd707d47ba3d9f46fd6479bd37938ef9b564df67.tar.gz |
reviewed by: Darin Adler <darin@eazel.com>
Fixed bug 4037 (Error dialog every time on launch when
permissions are set strangely)
Fixed bug 1115 (Need better name for "User Directory"
and "User Data Directory")
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_user_main_directory): Removed g_warning when
Nautilus fails to create ~/Nautilus directory, improved
FIXME comments.
(nautilus_get_user_directory), (nautilus_get_desktop_directory):
Added FIXME comments.
* src/nautilus-application.c:
(check_required_directories): Renamed from nautilus_application_
check_user_directories; now returns FALSE if any required
directories were not created. Reworded error dialog to mention
directories by path rather than using confusing invented symbolic
names, and to tell the user to address the problem by creating
specified directories or setting permissions such that Nautilus
can create specified directories. (It used to say "restart
Nautilus", which was pretty much guaranteed to have no effect.)
(nautilus_application_startup): Now returns if
check_required_directories fails. The user has to address the
problem described in the error message before Nautilus will
launch.
Diffstat (limited to 'libnautilus-private/nautilus-file-utilities.c')
-rw-r--r-- | libnautilus-private/nautilus-file-utilities.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c index dca503d23..defa8120b 100644 --- a/libnautilus-private/nautilus-file-utilities.c +++ b/libnautilus-private/nautilus-file-utilities.c @@ -443,6 +443,13 @@ nautilus_get_user_directory (void) if (!g_file_exists (user_directory)) { mkdir (user_directory, DEFAULT_NAUTILUS_DIRECTORY_MODE); + /* FIXME bugzilla.eazel.com 1286: + * How should we handle the case where this mkdir fails? + * Note that nautilus_application_startup will refuse to launch if this + * directory doesn't get created, so that case is OK. But the directory + * could be deleted after Nautilus was launched, and perhaps + * there is some bad side-effect of not handling that case. + */ } return user_directory; @@ -466,6 +473,13 @@ nautilus_get_desktop_directory (void) if (!g_file_exists (desktop_directory)) { mkdir (desktop_directory, DEFAULT_DESKTOP_DIRECTORY_MODE); + /* FIXME bugzilla.eazel.com 1286: + * How should we handle the case where this mkdir fails? + * Note that nautilus_application_startup will refuse to launch if this + * directory doesn't get created, so that case is OK. But the directory + * could be deleted after Nautilus was launched, and perhaps + * there is some bad side-effect of not handling that case. + */ } return desktop_directory; @@ -535,15 +549,20 @@ nautilus_get_user_main_directory (void) GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE, NULL, NULL); + /* FIXME bugzilla.eazel.com 1286: + * How should we handle error codes returned from gnome_vfs_xfer_uri? + * Note that nautilus_application_startup will refuse to launch if this + * directory doesn't get created, so that case is OK. But the directory + * could be deleted after Nautilus was launched, and perhaps + * there is some bad side-effect of not handling that case. + */ + gnome_vfs_uri_unref (source_uri); gnome_vfs_uri_unref (destination_uri); - - /* FIXME bugzilla.eazel.com 1286: - * Is a g_warning good enough here? This seems like a big problem. + + /* If this fails to create the directory, nautilus_application_startup will + * notice and refuse to launch. */ - if (result != GNOME_VFS_OK) { - g_warning ("could not install the novice home directory. Make sure you typed 'make install'"); - } /* assign a custom image for the directory icon */ file_uri = gnome_vfs_get_uri_from_local_path (user_main_directory); |