bugGNU Octave - Bugs: bug #48182, uiputfile returns incorrect...

 
 

bug #48182: uiputfile returns incorrect filename

Submitted by:  Rik <rik5>
Submitted on:  Wed 08 Jun 2016 06:43:17 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 08 Jun 2016 09:51:53 PM UTC, comment #4:

Okay, I added some logic to specifically detect the "." pattern and avoid adding '.' to the end of filenames. See http://hg.savannah.gnu.org/hgweb/octave/rev/cf690a73a186.

Rik <rik5>
Project Administrator
Wed 08 Jun 2016 09:20:36 PM UTC, comment #3:

Same in the gui as well - without it, it works fine for . but something like:

[a,b,c] = uiputfile ({'*.txt', 'Txt files'})

then fails to be correct if user inputs a name without the extension

John Donoghue <lostbard>
Project Member
Wed 08 Jun 2016 09:10:22 PM UTC, comment #2:

I think the intent here is to add the file extension if a new file is entered in the dialog.

For example if I do uiputfile(".txt"), and I enter "foo" in the dialog box, the answer is supposed to be "foo.txt". There are unintended consequences here with your example, or with a scenario where I do uiputfile(".m") and then enter a full file name of "foo.txt".

Mike Miller <mtmiller>
Project Administrator
Wed 08 Jun 2016 06:48:46 PM UTC, comment #1:

Annoying. This is clearly an issue in uiputfile.m. After calling the file dialog function it post-processes the result. See below.

Does anyone know if this whole if branch is necessary anymore? I'd just as soon delete the whole thing.

Rik <rik5>
Project Administrator
Wed 08 Jun 2016 06:43:17 PM UTC, original submission:

Using 'run-octave --no-gui' with a file name 'a.log' in the cwd.

Run

There is an extra '.' at the end of the file returned.

Note that this does not occur with uigetfile().

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

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 mtmiller (Posted a comment)
  • -unavailable- added by rik5 (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Jun 2016 09:51:53 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1