Open hansek opened 9 years ago
Is it even valid to use quotes in a uri/alias? The file path for objects is cleaned through the modResource::filterPathSegment function in https://github.com/modmore/Gitify/blob/master/src/Command/ExtractCommand.php#L226, while it assumes the uri (alias) of the object was already cleaned up with that method when it was set...
Maybe it's not valid, but nowadays you can have even utf-8 in URL (alias) and if you don't have clean (properly clean only for safe characters) alias in MODX you will get this alias as filename and problem is here.
Imho I think this functionality should be part of Gitify, because otherwise there could be a problem (i got into this situation few times) that extract command saves not clean filename (even with utf8 characters) with different characters depend on your OS (*nix vs. windows)
+1
There is a problem if resource alias contains not standard (alphanumeric) characters (e.g. prefix-“content”-suffix).
If this is stored to filesystem on windows it is different from state stored in GIT repo on some *nix machine.
Solution could be to strip all non alpha-numeric characters from file/directory name and to be name of file/directory unique, lets use suffix with resource ID.
Example: Resorce alias: prefix-“content”-suffix Filename: prefix-content-suffix--45 (where 45 is resource ID)