Drupal Association members fund grants that make connections all over the world.
Uploading file via Media upload widget never can update own file paths.
As I see, getting flag if a file need to update own path a little bit old school in D7. The File API is more complex, than a $file->timestamp == REQUEST_TIME condition could return valid value in all case. In the future, I think, this should cause errors in other modules, not only with media. If a file is fully processed before an entity is saved, this condition will never match.
I think, we need to track per files, if the file is processed by filefield paths.
1. Need to add a field to file_managed table, eg. ffp_processed.
2. Need to figure out, how to create a correct update method, to actualize the new field.
What data need to store in ffp_processed field? First, I set it up as a simple flag. Then I think about it, should be useful to store something else about entity, where the ffp data comes from? If yes, how to store? Only the entity id isn't enough, wee need minimum the entity type too, or instance? Store this a serialized field?
How to update existing files? Is there any always fix condition set, to determine: the file was processed by filefield path earlier?
I don't know, this is only 2.x issue, but if I use a field with media selector widget, ffp only works, if active updateing is enabled. I don't have enough time to look into deep, but I think, in filefield_paths_filefield_paths_process_file($new, &$file, $settings, &$entity, $type, &$update) the $new is always false, because the media closes the full file uploading process.