Revision 96313bfe
Von Tamino Steinert vor 8 Monaten hinzugefügt
SL/File/Backend/Filesystem.pm | ||
---|---|---|
150 | 150 |
|
151 | 151 |
die "No files backend enabled" unless $::instance_conf->get_doc_files || $::lx_office_conf{paths}->{document_path}; |
152 | 152 |
|
153 |
unless ($version) { |
|
154 |
my $file_version = SL::DB::Manager::FileVersion->get_first( |
|
155 |
where => [file_id => $dbfile->id], |
|
156 |
sort_by => 'version DESC' |
|
157 |
) or die "Could not find a file version for file with id " . $dbfile->id; |
|
158 |
$version = $file_version->version; |
|
159 |
} |
|
160 |
|
|
153 | 161 |
# use filesystem with depth 3 |
154 |
$version ||= $dbfile->file_versions_sorted->[-1]->version; |
|
155 |
confess "Version is required." unless $version; |
|
156 | 162 |
my $iddir = sprintf("%04d", $dbfile->id % 1000); |
157 | 163 |
my $path = File::Spec->catdir($::lx_office_conf{paths}->{document_path}, $::auth->client->{id}, $iddir, $dbfile->id); |
158 | 164 |
if (!-d $path) { |
Auch abrufbar als: Unified diff
S:F:B:FileSystem: FIX: suche nach aktuellster FileVerison ohne Cache