bradstewart / electron-boilerplate-vue

Boilerplate application for Electron runtime
724 stars 94 forks source link

Fix a problem in windows os #35

Closed captyoungkyu closed 7 years ago

captyoungkyu commented 8 years ago

There is a problem in windows os. Because of the path module in node js, path.join()``s result can contain`` sometimes. For example, a icons path must beassets/img/icon.svg, but it can beassets/img\icon.svg now.

bradstewart commented 8 years ago

Is this actually a problem? Using path.join should handle cross-platform paths already.

captyoungkyu commented 8 years ago

It was not a cross-platform issue.

In windows os, path.join('a', 'b') // a\b

In browsers, src="assets/a\b"

Therefore it can cause the error not found in most of browsers(/assets/ab).

On Wed, Jul 27, 2016 at 1:35 AM, Brad Stewart < notifications@github.com [notifications@github.com] > wrote: Is this actually a problem? Using path.join should handle cross-platform paths already.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [https://github.com/bradstewart/electron-boilerplate-vue/pull/35#issuecomment-235326482] , or mute the thread [https://github.com/notifications/unsubscribe-auth/AHF3EEkPxqP9FemOLi6wc2phcCALHqMbks5qZjdAgaJpZM4JTWnt] .

bradstewart commented 7 years ago

Right you are, thanks. I clearly didn't read carefully. Seems like path.posix.join might be a simpler fix for #50 though.