Closed (fixed)
Project:
Migrate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2012 at 05:01 UTC
Updated:
18 Oct 2012 at 01:01 UTC
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
Comment #1
mikeryanEncoding the entire source path would encode the slashes. But, perhaps you want to explode on the slashes and encode each component?
Comment #2
mikeryanComment #3
mikeryanOK, 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.