Update File.php #2899

Merged
merged 1 commit into from Mar 2, 2014

Conversation

Projects
None yet
3 participants
@IgorNadj
Contributor

IgorNadj commented Feb 26, 2014

Updating wording to be less misleading, you can call write() after calling this function and it will still have no effect.

The file does not get moved because of this line:
https://github.com/silverstripe/silverstripe-framework/blob/3.1/filesystem/File.php#L515

Maybe add to the method doc, telling people to set ParentId and Name instead if they want to change the location of a file (if that's the correct method).

Update File.php
Adding warning, took me a couple hours to figure this out...

The file does not get moved because of this line:
https://github.com/silverstripe/silverstripe-framework/blob/3.1/filesystem/File.php#L515

Maybe add to the method doc, telling people to set ParentId and Name instead if they want to change the location of a file (if that's the correct method).
@tractorcow

This comment has been minimized.

Show comment Hide comment
@tractorcow

tractorcow Feb 26, 2014

Contributor

I agree; It would be good to add the note about Name and/or ParentID along with write triggering a rename. It is the correct method afaik.

Contributor

tractorcow commented Feb 26, 2014

I agree; It would be good to add the note about Name and/or ParentID along with write triggering a rename. It is the correct method afaik.

chillu added a commit that referenced this pull request Mar 2, 2014

@chillu chillu merged commit c3fcb91 into silverstripe:3.1 Mar 2, 2014

1 check passed

default Scrutinizer: No new issues — Travis: Passed
Details

@IgorNadj IgorNadj deleted the IgorNadj:patch-1 branch Mar 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment