Gossamer Forum
Home : Products : Others : Fileman :

Files missing in file listing

Quote Reply
Files missing in file listing
Hi

I have licenced the multiuser version of FileMan and I have noticed the following problem:

Opening a folder that contains many "pages" of files (and not only one single page) has the following effect on our system: Once the file listing needs to be split into multiple pages, one file is missing between each page.

The file listing looks like this:

Page one of folder one:
file1
file2
file3
>>>>>>file4 is missing

Page two of folder one:
file5
file6
file7


Clicking on "All" helps - once you choose to show the full file list which is not split into multiple pages, the missing file4 from the example above is shown in the list.

TIA for your feedback
Smileliver
Quote Reply
Re: [olivers] Files missing in file listing In reply to
Hi,

I noticed this before too :( (on the GLinks version). Thought it was just me going mad Tongue

Any chance of a fix GT? I would attempt to work out a fix myself, but I'm not really very competent with Fileman, as I've never really worked on the code with it.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Files missing in file listing In reply to
Hello again

I've looked around a bit in the FileMan code and it seems to me that the file listing is done here:

/private/lib/GT/FileMan/Commands.pm

In sub list_files, you find a comment saying
#Prepare output after sort
#Skip pages

I've tried to modify the following code (I've added the green part):

Code:

foreach (@$sorted) {
$skip++;
if (($#$sorted >= $r_pg) and ($pg > 0)) {
my $r_start = ($pg == 1) ? 1 : (($pg - 1) * $r_pg + 1);
next if ($skip < $r_start);
$count++;
last if ($count == $r_pg + 1);
}
push @$output, $_;
}
As far as I could see, this modification seems to have solved the problem on my box.

But: I haven't tested it really and you try it on your own risk.
I'd be glad if a perl programmer from GT could confirm that is the right way to solve it Wink

Cheers,
Smileliver
Quote Reply
Re: [olivers] Files missing in file listing In reply to
Hi,

Cool, seems to work fine :) As you said though, would be good to get confirmation from GT, if this is the correct way to "fix" this bug <G>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Files missing in file listing In reply to
Hi there,

That should work. Anyway, here is the cleaner code:

Code:
if ($def_files ne 'all' and $pg ne 'all' and @$sorted > $r_pg){
my $skip = 0;
my $r_start = $pg == 1 ? 1 : ($pg - 1) * $r_pg + 1;
foreach (@$sorted) {
$skip++;
next if $skip < $r_start;
last if scalar @$output == $r_pg;
push @$output, $_;
}
$speed_bar = $self->speed_bar(scalar @$sorted) if scalar @$sorted >= $r_pg;
}
else {
$speed_bar = $self->speed_bar(scalar @$sorted) if scalar @$sorted >= $r_pg and $pg eq 'all';
$output = $sorted;
}

B.
Quote Reply
Re: [604] Files missing in file listing In reply to
Hi

many thanks for your fast reply Cool
I'm going to add the code to the FileMan installation on our server.

All the best
Smileliver
Quote Reply
Re: [604] Files missing in file listing In reply to
Hi,

You new 604? Tongue (or just a handle change?)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Files missing in file listing In reply to
View the profile Tongue