Closed Shykuzo closed 2 years ago
Hi 👋🏻 Thanks you for your report. It looks like there is an issue when downloading the file. This is not directly related to the missing file creation, i don't think. I will fix it for the next release.
I think I have explained it wrong. In fact, when the download is done, the ".zip" file is in "plugins/Punishment-Update/" except that this folder "Punishment-Update" does not create itself is because of the errors.
The download and everything works perfectly, it's really during the unzip that it causes a problem.
You should automatically create the folder if it does not exist, to avoid this kind of error ^^
So if i summarize the issue, when you're trying to unzip the zipped file, you get an error because the destination directory doesn't exist, right?
Yes, that's it
Hi 👋🏻 Using the new async system of Skent, this problem should be solved. Here is the code i tried:
command test:
trigger:
set {_download_link} to "https://github.com/Olyno/skent/archive/refs/tags/3.1.0.zip"
sync download file from {_download_link} to file path "plugins/abc.zip"
sync unzip all files from file path "plugins/abc.zip" to dir path "plugins/abc"
delete file path "plugins/abc.zip" # Note this line could change between now and the release moment. Look at the release to be sure!
Also, i noticed you used this line: replace all "plugins/Skript/scripts/" with "" in {_Path}
. You don't need this line, you can use set {_Path} to file name of {_Path}
instead.
Feel free to reopen the issue if not fixed after the release.
Describe your problem
When downloading a file and indicating that it should be placed in a folder, if the folder does not exist, an error is returned. It would be good to check if the folder exists and if it does not, it is created automatically.
Versions
Skript: 2.5.3 Server: 1.12.2 (Paper) Skent: 2.1.0
Code
Error
https://www.toptal.com/developers/hastebin/otinecalaj.md