[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] Patch for bug #44950
From: |
Mike Frysinger |
Subject: |
Re: [Nano-devel] Patch for bug #44950 |
Date: |
Tue, 19 Jan 2016 13:38:02 -0500 |
On 18 Jan 2016 11:50, Benno Schulenberg wrote:
> + if (stat(parentdir, &parentinfo) != -1 && S_ISDIR(parentinfo.st_mode))
> + valid_path = TRUE;
> + else {
> + statusbar(_("Directory '%s' does not exist"), parentdir);
this warning can be inaccurate/confusing. the reason for stat() failure
is not always ENOENT, and it can hit here when it's not a dir. maybe:
valid_path = FALSE;
if (stat(parentdir, &parentinfo) != -1) {
statusbar(_("Directory '%s' failed: %s"), parentdir,
strerror(errno));
beep();
} else if (!S_ISDIR(parentinfo.st_mode)) {
statusbar(_("Path '%s' is not a directory"), parentdir);
beep();
} else
valid_path = TRUE;
-mike
signature.asc
Description: Digital signature
- Re: [Nano-devel] Patch for bug #44950, (continued)
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/17
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/18
- Re: [Nano-devel] Patch for bug #44950, Rishabh Dave, 2016/01/18
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/19
- Re: [Nano-devel] Patch for bug #44950, Rishabh Dave, 2016/01/19
- Re: [Nano-devel] Patch for bug #44950, Mike Frysinger, 2016/01/19
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/20
- Re: [Nano-devel] Patch for bug #44950, Mike Frysinger, 2016/01/20
- Re: [Nano-devel] Patch for bug #44950, Rishabh Dave, 2016/01/20
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/20
- Re: [Nano-devel] Patch for bug #44950,
Mike Frysinger <=
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/20
- Re: [Nano-devel] Patch for bug #44950, Rishabh Dave, 2016/01/20
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/21
- Re: [Nano-devel] Patch for bug #44950, Rishabh Dave, 2016/01/23
- Re: [Nano-devel] Patch for bug #44950, Rishabh Dave, 2016/01/23
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/23
- Re: [Nano-devel] Patch for bug #44950, Benno Schulenberg, 2016/01/10