Skip to content
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

Path is changed when using gs:// bucket wrappers #170

Closed
mohsinsumar opened this issue Jan 25, 2016 · 2 comments
Closed

Path is changed when using gs:// bucket wrappers #170

mohsinsumar opened this issue Jan 25, 2016 · 2 comments

Comments

@mohsinsumar
Copy link

Hi,

I'm using setCompileDir("gs://[project]/[bucket]") and somewhere along the way; Smarty is rewriting the compileDir and trying to write to:

[path to index.php]/gs:/[project]/[bucket]

An uncaught Exception was encountered

Type: SmartyException

Message: unable to write file /base/data/home/apps/e~ xxxxx-xxxxx/production-004.390238181818785776/public_html/app/gs:/xxxxx/xxxxx/templates_c/wrt56a6795f58bba5_81503512

Filename: /base/data/home/apps/e~xxxxx-xxxxx/production-004.390238181818785776/system/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php

Line Number: 59

PS: The above gs:// used to work fine with Smarty2; but does not work with latest version Smarty 3.1.29

@mohsinsumar
Copy link
Author

I applied a quick fix for now in Smarty.class.php > _realpath function and added this snippet at the top. It basically checks if the path starts with gs:// and returns it as is, and skips all the normalize path processes.

    // If GS:// then return direct
    if( substr($path, 0, 5) == "gs://" ) {
        return $path;
    }

@uwetews
Copy link
Contributor

uwetews commented Jan 28, 2016

The fix is now in the master branch and will late be included in 3.1.30

@uwetews uwetews closed this as completed Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants