mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-29 08:24:18 +08:00
Nextcloud prevent serving precompressed files due to too many setups that fail
This commit is contained in:
parent
cc383f6b0e
commit
d68843e4ec
2 changed files with 5 additions and 9 deletions
|
@ -29,15 +29,11 @@ $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('snappymai
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (is_file($file)) {
|
if (is_file($file)) {
|
||||||
$newFile = str_replace('\\', '/', $file);
|
$newFile = str_replace('\\', '/', $file);
|
||||||
// $newFile = str_replace("'snappymail/v/'.", '', $newFile);
|
$newName = str_replace('/.htaccess', '/_htaccess', $newFile);
|
||||||
$nc_tar->addFile($file, "snappymail/app/{$newFile}");
|
$nc_tar->addFile($file, "snappymail/app/{$newName}");
|
||||||
$hashes["app/{$newFile}"] = hash_file('sha512', $file);
|
$hashes["app/{$newFile}"] = hash_file('sha512', $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$nc_tar->delete("snappymail/app/snappymail/v/{$package->version}/app/.htaccess");
|
|
||||||
$nc_tar->addFile("snappymail/v/{$package->version}/app/.htaccess", "snappymail/app/snappymail/v/{$package->version}/app/_htaccess");
|
|
||||||
$nc_tar->delete("snappymail/app/snappymail/v/{$package->version}/static/.htaccess");
|
|
||||||
$nc_tar->addFile("snappymail/v/{$package->version}/static/.htaccess", "snappymail/app/snappymail/v/{$package->version}/static/_htaccess");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$nc_tar->addFile('data/.htaccess');
|
$nc_tar->addFile('data/.htaccess');
|
||||||
|
|
|
@ -35,9 +35,9 @@ class InstallStep implements IRepairStep
|
||||||
if (!\file_exists(APP_VERSION_ROOT_PATH . 'app/.htaccess') && \file_exists(APP_VERSION_ROOT_PATH . 'app/_htaccess')) {
|
if (!\file_exists(APP_VERSION_ROOT_PATH . 'app/.htaccess') && \file_exists(APP_VERSION_ROOT_PATH . 'app/_htaccess')) {
|
||||||
\rename(APP_VERSION_ROOT_PATH . 'app/_htaccess', APP_VERSION_ROOT_PATH . 'app/.htaccess');
|
\rename(APP_VERSION_ROOT_PATH . 'app/_htaccess', APP_VERSION_ROOT_PATH . 'app/.htaccess');
|
||||||
}
|
}
|
||||||
if (!\file_exists(APP_VERSION_ROOT_PATH . 'static/.htaccess') && \file_exists(APP_VERSION_ROOT_PATH . 'static/_htaccess')) {
|
// if (!\file_exists(APP_VERSION_ROOT_PATH . 'static/.htaccess') && \file_exists(APP_VERSION_ROOT_PATH . 'static/_htaccess')) {
|
||||||
\rename(APP_VERSION_ROOT_PATH . 'static/_htaccess', APP_VERSION_ROOT_PATH . 'static/.htaccess');
|
// \rename(APP_VERSION_ROOT_PATH . 'static/_htaccess', APP_VERSION_ROOT_PATH . 'static/.htaccess');
|
||||||
}
|
// }
|
||||||
|
|
||||||
$oConfig = \RainLoop\Api::Config();
|
$oConfig = \RainLoop\Api::Config();
|
||||||
$bSave = false;
|
$bSave = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue