bugGNU Octave - Bugs: bug #42004, uigetdir returns a dirname that is...

 
 

bug #42004: uigetdir returns a dirname that is not a directory name

Submitted by:  Allan Jacobs <allanjacobs>
Submitted on:  Sun 30 Mar 2014 06:48:14 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: allanjacobsOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 31 Mar 2014 10:26:50 AM UTC, comment #4:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/40dce9423baa

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 31 Mar 2014 02:18:54 AM UTC, comment #3:

This works for me (attached). Not yet verified for Windows.

(file #31084)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sun 30 Mar 2014 09:29:18 PM UTC, comment #2:

Its not a Linux only issue - it also occurs in Windows, both dev and 3.8.1.

The fix should be in dialog.cc where the issue is originating.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sun 30 Mar 2014 06:50:31 PM UTC, comment #1:

$ hg id
8d4d78285c8e+
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="13.10, Saucy Salamander"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 13.10"
VERSION_ID="13.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

Allan Jacobs <allanjacobs>
Sun 30 Mar 2014 06:48:14 PM UTC, original submission:

1. Create a directory in your home directory that does not have subdirectories. Denote it <nosub_dir>.
2. uigetdir(<home_dir>)
3. In file chooser, double click on <nosub_dir>. The file chooser is now empty. Click on the "Choose" button.
4. The returned answer will be <home_dir>/<nosub_dir>/<nosub_dir> and should be <home_dir>/<nosub_dir>.

The attached code has a Unix-specific fix. The code looks like it needs special case handling for the root directory ('/') but it turns out not to be true in practice.

Allan Jacobs <allanjacobs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #31084:  uigetdir.patch added by lostbard (2KiB - text/x-patch)
file #31078:  uigetdir.m added by allanjacobs (3KiB - text/x-objcsrc - Proposed patch for uigetdir.m.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by allanjacobs (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 01 Apr 2014 10:35:48 AM UTClostbardStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 31 Mar 2014 10:26:50 AM UTClostbardStatusPatch Submitted=>Ready For Test
      Assigned toNone=>lostbard
    Mon 31 Mar 2014 02:18:54 AM UTClostbardAttached File-=>Added uigetdir.patch, #31084
      StatusConfirmed=>Patch Submitted
    Sun 30 Mar 2014 09:29:49 PM UTClostbardStatusNone=>Confirmed
    Sun 30 Mar 2014 09:29:18 PM UTClostbardOperating SystemGNU/Linux=>Any
    Sun 30 Mar 2014 06:48:14 PM UTCallanjacobsAttached File-=>Added uigetdir.m, #31078

    Back to the top


    Powered by Savane 3.1-cleanup1