Open NoahDragon opened 7 years ago
Can you provide a demo uploaded site?
Do you mean blog/2015
, blog/2015/10
and blog/2015/10/12
are all files?
Sorry, I didn't explain clearly. I have updated the original question.
Let's say blog/2015
, it is a folder with the name of string "blog/2015", and under that folder is empty.
Well, we can't make a directory with a /
in the name.
Menci@Menci-Laptop ~ node
> fs.mkdirSync('a\/b')
Error: ENOENT: no such file or directory, mkdir 'a/b'
at Object.fs.mkdirSync (fs.js:854:18)
at repl:1:4
at realRunInThisContextScript (vm.js:22:35)
at sigintHandlersWrap (vm.js:98:12)
at ContextifyScript.Script.runInThisContext (vm.js:24:12)
at REPLServer.defaultEval (repl.js:346:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.onLine (repl.js:545:10)
at emitOne (events.js:101:20)
>
Sorry, my mistake again. It is "blog\2015".
I'm using win8.1 OS. I think it is caused by the different Unix/Win path system.
The folder is looks like the image above.
It seems a cross-platform issue. It works well under Linux and OS X.
I'll check the code, maybe I should use /
under all platform for the path spliter.
I don't have Windows. I tried this https://github.com/Menci/hexo-deployer-upyun/commit/b8db95fe4f552695d8e6282d52ceacd356728ff0 in the branch https://github.com/Menci/hexo-deployer-upyun/tree/fix-win32-path. It may fix it.
Thank you, I will try it, and keep you updated.
E.g. I have a file under public/blog/2015/10/12/index.html, it will be uploaded as following folders (Note: they are folders with that exact name, not folder path):