SheepShaver for Windows truncates directory listings; fix?

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

SheepShaver for Windows truncates directory listings; fix?

Post by emendelson »

As far as I can tell, SheepShaver for Windows has an upper limit on the number of filenames that it can display in a Finder window opening on a host folder. If the directory has a large number of files, SheepShaver for Windows shows only some of the files. It seems to cut off the listing at an unpredictable point in the alphabet - so that, for example, the only files listed have names beginning with A through M, and filenames beginning with N through Z aren't shown.

Does anyone here know where in the source code there might be an easy fix to increase whatever buffer is used for storing filenames? I posted an issue on GitHub, but I thought it might be worth asking about here. Here's the GitHub issue report:

https://github.com/cebix/macemu/issues/111

Any insight will be welcome. Thanks to help in this forum, I'm able to build SheepShaver for Windows (though without JIT support), and I'm happy to experiment.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SheepShaver for Windows truncates directory listings; fi

Post by adespoton »

I think the limit would be based on the entire string length, and not number of files -- that is, it would contain a max string length for all the filenames concatenated together. I'm not sure if the limit is on the Mac side (shows up to the buffer length of filenames and then stops) or on the host side (stores the entire filepath of each file until the limit is reached). Does the number of files listed changed if you move your Shared folder closer to C: or further away (nested deeper in subdirectories)?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: SheepShaver for Windows truncates directory listings; fi

Post by emendelson »

adespoton wrote:I think the limit would be based on the entire string length, and not number of files -- that is, it would contain a max string length for all the filenames concatenated together. I'm not sure if the limit is on the Mac side (shows up to the buffer length of filenames and then stops) or on the host side (stores the entire filepath of each file until the limit is reached). Does the number of files listed changed if you move your Shared folder closer to C: or further away (nested deeper in subdirectories)?
The limit seems to be per folder, and may depend on whether icons are associated with the files. For example, a top-level folder with a lot of files that have their own icons might display 60 files; a folder below that with very few files with icons might display 90 files.

But the real question is: Can you actually suggest somewhere in the code where this might be fixed? What you say in your first sentence is unquestionably interesting, but does it get us any closer to a solution? Can you point to the place in the code where the limit might be set? I'm not sure anything else is actually useful.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: SheepShaver for Windows truncates directory listings; fi

Post by emendelson »

asvitkine has made a suggestion in this thread at GitHub:

https://github.com/cebix/macemu/issues/ ... -container

As item #3 shows, I've tried to follow his advice, with no result (except in one meaningless cosmetic change). If anyone else has any ideas, I'll be grateful, and this seems something worth fixing in Windows SheepShaver anyway.
Post Reply