Why in the latest dev do you urlencode only the basename? This was added in commit 7b76d906 on line 352 in plugins/destinations/file.inc

My migration was working just fine until that commit. I am migrating from a CSV file. I had to make sure that all my URLs were encoded. Now I have to make sure that the path or directory is encoded, but not the basename (or filename).

Why only the filename? Can we change this the encode the entire sourcePath.

Comments

mikeryan’s picture

Encoding the entire source path would encode the slashes. But, perhaps you want to explode on the slashes and encode each component?

mikeryan’s picture

Title: Inconsitant urlencoding » Inconsistent urlencoding
Status: Active » Postponed (maintainer needs more info)
mikeryan’s picture

Status: Postponed (maintainer needs more info) » Fixed

OK, ran into this myself with some directories containing spaces, so I had some real data to test with. It will now urlencode all path components - and while it's at it, only do it for full URIs, not local files, which probably fixes #1800616: Whitespace in file uri is urlencoded and breaks file copy with MigrateFileUri.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.