Fri 28 Mar 2014 05:02:38 PM UTC, comment #8:
works for me now. Thanks.
|
Fri 28 Mar 2014 04:07:10 PM UTC, comment #7:
@Rik: Thanks. I'm sorry, I should have updated before modifying. Nevertheless, I'm not sure that file_in_loadpath() is required anymore (of course, my patch was wrong in any case).
|
Fri 28 Mar 2014 03:52:09 PM UTC, comment #6:
I checked in a changeset that should fix this (http://hg.savannah.gnu.org/hgweb/octave/rev/348f67886dc4). I'm marking the bug as "Ready For Test".
@Massimiliano, I based the change on the most current Mercurial sources rather than your patch because the sources had already shifted from using exist() to file_in_loadpath() to correct a different problem that Muhali found.
|
Fri 28 Mar 2014 12:48:36 PM UTC, comment #5:
I have submitted a patch that should fix the bug. It does not warn the user if he/she is using an extension that differs from ".ofig", but does not try to open file without extension. Thank you!
(file #31064)
|
Fri 28 Mar 2014 12:32:11 PM UTC, comment #4:
Hi,
first of all, I noticed that I was using the version I submitted, that turned out to be slightly different from the one that was committed. Indeed, I checked the file existence using a not-so-Octave way
that did not suffer from this bug. I think that the new version is better, but I am a little bit suspicious about the fact that the existence of the file is checked twice in two nested if. I think that these two solutions can be merged and I'm trying to do it, I will update this thread soon (I hope).
|
Fri 28 Mar 2014 09:33:56 AM UTC, comment #3:
when you do
you will see the error. BTW, did you use Rik's changeset?
|
Fri 28 Mar 2014 09:24:23 AM UTC, comment #2:
Hi all,
I am insterested in this bug as I have written the two buggy functions. Nevertheless, I haven't been able to reproduce the problem. I did
and it worked. So I tried
and it worked. Then I removed the file foo.ofig and I got
that is what I would have expected. So, I put a file foo.m in the current directory, getting again
that seems ok to me. Then I tried to plot, save and load again and it worked as in the previous case. So I haven't tested the right (faulty) case, or the behaviour I expect isn't the right one. Can you please help me understand the problem? Thanks!
|
Fri 28 Mar 2014 12:21:06 AM UTC, comment #1:
This was partially fixed in changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/70d9db29db6f
But as Muhali noted on the mailing list (and I can confirm), there is still a problem if a file named "foo" exists in the same directory as "foo.ofig".
Based on the description of the function, it should probably add the ".ofig" extension unconditionally if the given string argument has no file extension.
|
Thu 27 Mar 2014 02:30:30 PM UTC, original submission:
If there is a file 'foo.ofig' plus a file 'foo.m' in the current directory (or anywhere in the load path), the command
hgload("foo")
does not work. In this part of the hgload function
the check is incomplete, as it finds foo.m.
|