SiavashBamshadnia / Laravel-Source-Encrypter

Laravel and Lumen Source Code Encrypter
MIT License
535 stars 124 forks source link

failed to open stream: No such file or directory #13

Open bahramiholding opened 3 years ago

bahramiholding commented 3 years ago

hello i have this error in laravel 8 and 7

` copy(/root/encrypted//database/processes/LeaveAbsenceRequest.bpmn): failed to open stream: No such file or directory

at vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:302 298▕ @return bool 299▕ / 300▕ public function copy($path, $target) 301▕ { ➜ 302▕ return copy($path, $target); 303▕ } 304▕ 305▕ /* 306▕ Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.

  +17 vendor frames 

18 artisan:37 Illuminate\Foundation\Console\Kernel::handle() `

SiavashBamshadnia commented 3 years ago

Hi Please write the artisan command you run

bahramiholding commented 3 years ago

php artisan encrypt-source

bahramiholding commented 3 years ago
    public function copy($path, $target)
    {
//        return copy($path, $target);
    } 

when comment section of code in provider project working prefect

SiavashBamshadnia commented 3 years ago

OK. Does your project work without problems?

panapol-p commented 2 years ago

I think this bug is from incorrect path I saw double slash below

copy(/root/encrypted//database/processes/LeaveAbsenceRequest.bpmn)

that is the reason why cannot copy fix issue by replace double slash to slash before this line https://github.com/SiavashBamshadnia/Laravel-Source-Encrypter/blob/8f5515defdfa4c6b1de85a1814fec9a9299a050a/src/SourceEncryptCommand.php#L125