EISDIR: illegal operation on a directory, copyfile 'Assets/Directory/Subdirectory'
Hi, I'm trying to package a directory with subdirectories inside and it fails when trying to package these subdirectories.
Error: EISDIR: illegal operation on a directory, copyfile 'Assets/Directory/Subdirectory' -> 'tempFolderkI3Kww/archtemp/9c073fbaccbf4982bbbdb0d1dd95d098/asset' at Object.copyFileSync (fs.js:1907:3) at /home/runner/work/_actions/pCYSl5EDgo/create-unitypackage/master/node_modules/unitypackage/dist/index.js:72:30 at FSReqCallback.oncomplete (fs.js:156:23) { errno: -21, syscall: 'copyfile', code: 'EISDIR', path: 'Assets/Directory/Subdirectory', dest: 'tempFolderkI3Kww/archtemp/9c073fbaccbf4982bbbdb0d1dd95d098/asset'
If I try to package a directory with just files inside it works perfect but there are problems when it has subdirectories.
Many thanks!
@pCYSl5EDgo I'm using this command to collect files:
find Assets/Directory -name \*.meta >> filesList
Inside that Directory there are folders and files with meta files.
Is there something wrong?
Thanks!
I've digged around and found that some folder assets don't include folderAsset key.
Folder asset generated by Unity (through Unity's Project window or directory creation in background):
fileFormatVersion: 2
guid: feae48b6f9bfa403487f93efdbfd6f37
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Folder asset generated by JetBrains Rider (through right clicking Explorer pane):
fileFormatVersion: 2
guid: 67752b85c7144d728576d4fe78980202
timeCreated: 1664390072
This is the reason metaDatum.folderAsset !== "yes" check fails.
Maybe we should accept a different way to detect a folder asset.
By the way, I came up here because this Action is used in vrchat-community/template-package, so congratulations! Also another thanks from me (I have yet to manage this to work though)
Thank you for your digging. As it seemed enough for me to fix the issue, I changed some codes. I hope this version(current master is v1.1.1) will help you.
Just have confirmed that I am now able to create a package from my personal project, which definitely contains a lot of subfolders made in JetBrains Rider.
I appreciate your quick fix and nice work!
Hope this also fixes @ArnauKokoro's issue.
I close this issue because 1 year has passed and there seems no problem.