Convert usages of path to filepath for target OS compatibility

Issues https://github.com/spf13/hugo/issues/560 and https://github.com/spf13/hugo/issues/604 exposed the need to consistently use path\filepath instead of path.

Doing this will not resolve the above issues, but will, hopefully, prevent more path related issues related to path separator and Windows from occurring.

Changing this involves approximately 14 files. I will break this up into package related updates, submitting a separate pull request for each package. From my initial search of the code, the following packages will be updated:

commands
create
helpers
hugolib
source
target

@OwenWaller are you currently working on tests for any of the above packages?

I submitted pull requests for the above changes.

@OwenWaller I hope this doesn’t complicate any testing you are working on. If so, I’d be happy to help resolve any issues.

@mohae

Hiya,

A quick couple off things.

  • Nope I’ve not seen the bug. But then I don’t use Windows :slight_smile:
  • If this is a path separator issue, we should only be using the os.PathSeparator constant. See:
    http://golang.org/pkg/os/#pkg-constants
    So any reference to a “/” or a “” in the code is a bug.
  • Nope, I’m not touching anything in those directories tonight. Tomorrow and over the weekend maybe. There is a ‘utils’ package somewhere that I wanted to look at first as the coverage was like 11%
  • And nope why would this change effect me? We’re all using git :slight_smile: My changes are always isolated in my own branches. So feel free to change away, I’ll get your change when I next catchup with upstream branch and merge that into my local branch. Easy :slight_smile: