-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve impress templates #10463
Open
Rash419
wants to merge
6
commits into
CollaboraOnline:master
Choose a base branch
from
Rash419:improve-impress-templates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+269
−119
Open
Improve impress templates #10463
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2c0ab14
lokit: mount childroot/tmp/incoming/templates over instdir/share/comm…
Rash419 618ec69
wsd: added "RemoteAssetConfigPoll"
Rash419 d938299
remoteassetpoll: remove templates when json entries is removed
Rash419 2933f95
wsd: remoteconfig: support `fontconfiguration` using `RemoteAssetConf…
Rash419 168283b
wsd: remoteconfig: use `RemoteAssetConfigPoll` for remote_font_config…
Rash419 42f6475
wsd: remove unused `RemoteFontConfigPoll`
Rash419 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3254,6 +3254,10 @@ void lokit_main( | |
const std::string tmpSubDir = Poco::Path(tempRoot, "cool-" + jailId).toString(); | ||
const std::string jailTmpDir = Poco::Path(jailPath, "tmp").toString(); | ||
|
||
const std::string tmpIncoming = Poco::Path(childRoot, JailUtil::CHILDROOT_TMP_INCOMING_PATH).toString(); | ||
const std::string sharedTemplate = Poco::Path(tmpIncoming, "templates").toString(); | ||
const std::string loJailDestImpressTemplatePath = Poco::Path(loJailDestPath, "share/template/common/presnt").toString(); | ||
|
||
const std::string sysTemplateSubDir = Poco::Path(tempRoot, "systemplate-" + jailId).toString(); | ||
const std::string jailEtcDir = Poco::Path(jailPath, "etc").toString(); | ||
|
||
|
@@ -3313,6 +3317,34 @@ void lokit_main( | |
return false; | ||
} | ||
|
||
// copy default tempates from 'common' dir to shared templates dir | ||
// TODO: maybe I shouldn't copy if whole point to mounting is that we don't require copying. | ||
auto defaultTemplates = FileUtil::getDirEntries(loJailDestImpressTemplatePath); | ||
for (auto& name : defaultTemplates) | ||
{ | ||
std::string sourcePath = loJailDestImpressTemplatePath; | ||
sourcePath.append("/"); | ||
sourcePath.append(name); | ||
std::string destPath = sharedTemplate; | ||
destPath.append("/"); | ||
destPath.append(name); | ||
if (!FileUtil::copy(sourcePath, destPath, false, false)) | ||
{ | ||
LOG_WRN("Failed to copy default impress template from [" | ||
<< sourcePath << "] to [" << sharedTemplate << ']'); | ||
} | ||
} | ||
|
||
// mount the shared templates over the lo shared templates' 'common' dir | ||
if (!JailUtil::bind(sharedTemplate, loJailDestImpressTemplatePath) || | ||
!JailUtil::remountReadonly(sharedTemplate, loJailDestImpressTemplatePath)) | ||
{ | ||
// TODO: actually do this link on failure | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I disable the mounting default templates templates doesn't show up at all. 1st we need to fix default template loading issue I think |
||
LOG_WRN("Failed to mount [" << sharedTemplate << "] -> [" << sharedTemplate | ||
<< "], will link contents"); | ||
return false; | ||
} | ||
|
||
// tmpdir inside the jail for added sercurity. | ||
Poco::File(tmpSubDir).createDirectories(); | ||
LOG_INF("Mounting random temp dir " << tmpSubDir << " -> " << jailTmpDir); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, how can we improve here except of copying default templates ?