bugGNU Octave - Bugs: bug #43926, test fullfile fails in MXE-Octave...


bug #43926: test fullfile fails in MXE-Octave ver. 4.1.0+

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Sat 03 Jan 2015 08:24:36 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  Philip Nienhuis <philipnienhuis>
Originator Name:  Avinoam Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)

You are not logged in

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


( Jump to the original submission)

Sun 11 Jan 2015 09:01:16 PM UTC, comment #10: 

see bug 43979

Avinoam Kalma <avinoam>
Project Member
Sun 11 Jan 2015 07:40:34 PM UTC, comment #9: 

Will you still file the bug report for unpack(), please?

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 11 Jan 2015 07:32:50 PM UTC, comment #8: 

I've adapted the original cs to also properly process drive letters on Windows + added two tests for that.


closing report

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 08 Jan 2015 11:25:14 PM UTC, comment #7: 

Yes, Matlab doesn't recognize "/" (slash) as path separator; although it changes it into a backslash. But doesn't collapse multiple consecutive backslashes into a single one.
Hmm.... looks like a ML bug...

Coming weekend I'll look again at his bug/patch

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Wed 07 Jan 2015 10:06:56 PM UTC, comment #6: 


checking matlab compatability in MATLAB Version (R2010a)
under windows:

fullfile ('a/', '/', '/', 'b', '/', '/')

ans =


 Octave result is different.

Avinoam Kalma <avinoam>
Project Member
Mon 05 Jan 2015 12:29:06 PM UTC, comment #5: 

Thanks for testing.
It occurred to me that perhaps the patch needs a bit more polishing as Windows has drive letters and *nix has not. I'll look into that (= whether it's needed) later on.

As to unpack, yes I just tried but what I saw has nothing to do with file separators but with tmp file/dir stuff.
Anyway please file a bug report for the error you saw.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 04 Jan 2015 08:39:02 PM UTC, comment #4: 


Thanks, it solves the bug.


test unpack fails from the same reason ('/' and '\' are not
the same). Should I open another bug?

Avinoam Kalma <avinoam>
Project Member
Sun 04 Jan 2015 01:46:35 PM UTC, comment #3: 

Here's a fix that works on Windows.

I saw little other options than to change '/' file separators on Windows (that do work generally) into native file separators ('\').
I also thought about mentioning that in the texinfo header but couldn't come up with good wording. Anyone?

(file #32755)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 04 Jan 2015 12:27:41 PM UTC, comment #2: 

Took a brief look in the fullfile.m function. Some comments:

1. In 4.1.0+ there's a completely new fullfile.m version compared to 3.9.0+.

2. (Just a hunch) maybe the various "/" entries in the last tests had better be replaced by filesep characters (variable 'fs') to match the system's native file separator character ? 
...but then again....:

3. On Windows, where filesep equals "\" (backslash), Octave very very often works equally well with "/" (forward slash) file separators. In fact I rarely use backslashes when doing file handling stuff with Octave on Windows.
Moreover, several Java functions when called through the Java interface simply do not accept backslashes as file separators, they want forward slashes, whether on Windows or not.

So relying on the system's filesep may need a little more rigid investigation.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 04 Jan 2015 11:26:15 AM UTC, comment #1: 

It works fine in 3.9.0+

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sat 03 Jan 2015 08:24:36 PM UTC, original submission:  


using GNU Octave Version: 4.1.0+ on Windows-7, (mxe-octave)
fullfile test fails in 4 of 24 tests. For example:

>> test fullfile
***** assert (fullfile ("a/", "/", "/", "b", "/", "/"), "a/b/")
!!!!! test failed
ASSERT errors for:  assert (fullfile ("a/", "/", "/", "b", "/", "/"),"a/b/")

  Location  |  Observed  |  Expected  |  Reason
     []      a/\/\/\b\/\/     a/b/       Strings don't match
shared variables   scalar structure containing the fields:
    fs = \
    fsx = \x
    xfs = x\
    fsxfs = \x\
    xfsy = x\y



Avinoam Kalma <avinoam>
Project Member


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

Attach Files:

Attached Files
file #32755:  bug43926_try1.cs added by philipnienhuis (2KiB - text/x-csharp)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by avinoam (Submitted the item)

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

    Only project members can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-11 philipnienhuis StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2015-01-10 philipnienhuis Assigned toNone => philipnienhuis
    2015-01-04 philipnienhuis StatusNone => Patch Submitted
    2015-01-04 philipnienhuis Attached File- => Added bug43926_try1.cs, #32755

    Back to the top

    Powered by Savane 3.5