[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shell commands in deleted directories
From: |
Antoine Levitt |
Subject: |
Re: Shell commands in deleted directories |
Date: |
Sun, 13 Feb 2011 22:16:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
13/02/11 22:13, Eli Zaretskii
>> From: Antoine Levitt <address@hidden>
>> Date: Sun, 13 Feb 2011 22:02:34 +0100
>>
>> if (NILP (Ffile_accessible_directory_p (current_dir)))
>> - report_file_error ("Setting current directory",
>> - Fcons (current_buffer->directory, Qnil));
>> + {
>> + /* If current_dir is unreachable (typically, does not exist), use
>> + ~/ as default */
>> + current_dir = build_string ("~/");
>> + current_dir = expand_and_dir_to_file (current_dir, Qnil);
>> + current_dir = Ffile_name_as_directory (current_dir);
>> + if (NILP (Ffile_accessible_directory_p (current_dir)))
>> + {
>> + report_file_error ("Setting current directory to ~/", Qnil);
>> + }
>> + }
>
> And "who is watching the watchdog"? That is, what if "~" does not
> exist, either?
That's precisely the report_file_error.
Re: Shell commands in deleted directories, Eli Zaretskii, 2011/02/13
- Re: Shell commands in deleted directories,
Antoine Levitt <=
Re: Shell commands in deleted directories, Stefan Monnier, 2011/02/14