Page 1 of 1

SheepShaver for Windows truncates directory listings; fix?

Posted: Sun Jul 09, 2017 10:32 pm
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.

Re: SheepShaver for Windows truncates directory listings; fi

Posted: Tue Jul 11, 2017 11:02 pm
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)?

Re: SheepShaver for Windows truncates directory listings; fi

Posted: Tue Jul 11, 2017 11:09 pm
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.

Re: SheepShaver for Windows truncates directory listings; fi

Posted: Fri Jul 14, 2017 1:04 pm
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.