|
My previous post, apparently
re-announcing LDView 3.1 Beta 1, had an incorrect subject line. The subject
line should have announced the release of LDView 3.1. I apologize for the
confusion.
--Travis Cobbs
|
|
|
Travis Cobbs wrote:
> My <http://news.lugnet.com/announce/?n=3313 previous post>, apparently
> re-announcing LDView 3.1 Beta 1, had an incorrect subject line. The subject
> line should have announced the release of LDView 3.1. I apologize for the
> confusion.
>
> --Travis Cobbs
Hi Travis,
I think I found a bug for you :)
LDView 3.1 wont load a model when it's sub models are (just like the
main file) in a root of a drive, D:\ in my case.
When you move all to a subfolder it works fine. Usually I don't keep
stuff in the root except folders but I was testing something I just
downloaded.
Also a suggestion: when detecting the LDraw location, you may want to
include the "c:\program files\ldraw" to the checklist, that's where I
(and others who don't like too many folders in c:\) keep LDraw.
Roland
|
|
|
rmelkert wrote:
> Travis Cobbs wrote:
> > My <http://news.lugnet.com/announce/?n=3313 previous post>, apparently
> > re-announcing LDView 3.1 Beta 1, had an incorrect subject line. The
> > subject
> > line should have announced the release of LDView 3.1. I apologize for
> > the
> > confusion.
> >
> > --Travis Cobbs
>
> Hi Travis,
>
> I think I found a bug for you :)
>
> LDView 3.1 wont load a model when it's sub models are (just like the
> main file) in a root of a drive, D:\ in my case.
>
> When you move all to a subfolder it works fine. Usually I don't keep
> stuff in the root except folders but I was testing something I just
> downloaded.
This is normally just an extraneous \
No folders normally have them except the root so you need to
conditionally add the \.
> Also a suggestion: when detecting the LDraw location, you may want to
> include the "c:\program files\ldraw" to the checklist, that's where I
> (and others who don't like too many folders in c:\) keep LDraw.
It should look in the LDraw.ini file that gives the correct path.
From c:\WINDOWS\ldraw.ini:
[LDraw]
BaseDirectory=c:\Program Files\LDraw\
--
Dean Earley, Dee (dean@earlsoft.co.uk)
irc: irc://irc.blitzed.org/
web: http://personal.earlsoft.co.uk
phone: +44 (0)780 8369596
|
|
|
In lugnet.cad, Roland Melkert wrote:
> Travis Cobbs wrote:
> > My <http://news.lugnet.com/announce/?n=3313 previous post>, apparently
> > re-announcing LDView 3.1 Beta 1, had an incorrect subject line. The subject
> > line should have announced the release of LDView 3.1. I apologize for the
> > confusion.
> >
> > --Travis Cobbs
>
> Hi Travis,
>
> I think I found a bug for you :)
>
> LDView 3.1 wont load a model when it's sub models are (just like the
> main file) in a root of a drive, D:\ in my case.
>
> When you move all to a subfolder it works fine. Usually I don't keep
> stuff in the root except folders but I was testing something I just
> downloaded.
Thanks for the report. I'll take a look at it.
> Also a suggestion: when detecting the LDraw location, you may want to
> include the "c:\program files\ldraw" to the checklist, that's where I
> (and others who don't like too many folders in c:\) keep LDraw.
I'll think about it. You only have to specify that once, and I don't want to
have the list of default locations to check grow out of control. On the other
hand, that is probably a reasonble place to look for and ldraw directory on a
Windows system.
--Travis
|
|
|
(FUT lugnet.cad.dev)
In lugnet.cad, Dean Earley wrote:
> rmelkert wrote:
> > LDView 3.1 wont load a model when it's sub models are (just like the
> > main file) in a root of a drive, D:\ in my case.
> >
> > When you move all to a subfolder it works fine. Usually I don't keep
> > stuff in the root except folders but I was testing something I just
> > downloaded.
>
> This is normally just an extraneous \
> No folders normally have them except the root so you need to
> conditionally add the \.
Actually, all the string handling code for the path stuff is fine (and
cross-platform to work in both Windows and *nix). After doing some
investigation, I discovered that the problem is that when we do a stat on the
directory, that doesn't work for a drive letter followed by a colon with no
slash or backslash after it. (I say we because it's in code that Lars
originally wrote, but I modified; I'm not 100% who originated this particular
code.)
Lars, the ldrawini code in LDView might be somewhat changed from what you have,
but I'm pretty sure what you have will fail also if the model path is something
like D:. The following code right before the existing stat call in IsDir fixes
the problem:
#ifdef _WIN32
if (strlen(Path) == 2 && Path[1] == ':')
{
char NewPath[4] = "";
strcpy(NewPath, Path);
NewPath[2] = '\\';
if (stat(NewPath, &Stat) == 0)
{
return Stat.st_mode & S_IFDIR;
}
}
#endif
|
|
|