Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
Pedalman

core updater - Windows XAMPP problem

Question

I think that the damn cool core updater module has a problem with a local install of Thirtybees under XAMPP Windows.

Downloads calculated, 7632 files to download. (0.1 s)
ERROR: Failed to download files with error: fatal: path not found: \admin1/ajax-tab.php

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I have the same issue. My XAMPP installation is in a thirtybees sub-directory. Could the path be instead read from a config setting?

Share this post


Link to post
Share on other sites
  • 0

You need two changes in /modules/coreupdater/classes/GitUpdate.php. In both cases you check whether the first char of $adminDir is a backslash and if so you remove it:

 

In the function downloadFileList() (around line 425) the following part will be changed:

        $fileList = false;
        if ($response) {
            $fileList = [];

            $adminDir = false;
            if (defined('_PS_ADMIN_DIR_')) {
                $adminDir = str_replace(_PS_ROOT_DIR_, '', _PS_ADMIN_DIR_);
				if($adminDir[0] == "\\") $adminDir = substr($adminDir,1);	/* new */
                $adminDir = trim($adminDir, '/').'/';
            }

The beginning of the function downloadFiles() (around line 870) will become:

    protected function downloadFiles()
    {
        $adminDir = false;
        if (defined('_PS_ADMIN_DIR_')) {
            $adminDir = str_replace(_PS_ROOT_DIR_, '', _PS_ADMIN_DIR_);
			if($adminDir[0] == "\\") $adminDir = substr($adminDir,1);	/* new */
            $adminDir = trim($adminDir, '/').'/';
        }

 

 

  • Thanks 2

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, musicmaster said:

You need two changes in /modules/coreupdater/classes/GitUpdate.php. In both cases you check whether the first char of $adminDir is a backslash and if so you remove it:

Yes that worked! Initially had a little issue with permissions on the cache/GitUpdateDownloads/config folder but once that was cleared then it worked. I guess my manual code update may at some time be over written by a future update.

Many thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×