Review Request: When moving a file from a temporary location, also update the file access/modification times.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Review Request: When moving a file from a temporary location, also update the file access/modification times.

Matthew Dawson-2

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100853/
-----------------------------------------------------------

Review request for ownCloud.


Summary
-------

When PHP moves a file across filesystem boundaries, it does not update the access/modification times.  Thus do it manually so that this information is not lost.


Diffs
-----

  inc/lib_filestorage.php 06ce26f0d23df0414883152a14e027ac405701f7

Diff: http://git.reviewboard.kde.org/r/100853/diff


Testing
-------

Tested with moving with /tmp and owncloud's data directory being on different filesystems.  Also tested with file being on the same filesystem.  In both cases data was preserved.


Thanks,

Matthew John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/owncloud/attachments/20110314/eb61d6e4/attachment.htm 

Reply | Threaded
Open this post in threaded view
|

Re: Review Request: When moving a file from a temporary location, also update the file access/modification times.

Robin Appelman

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100853/#review1942
-----------------------------------------------------------


If the modify/access times are updated on fromTmpFile, shouldn't it also be done on toTmpFile?

- Robin


On March 14, 2011, 2:55 a.m., Matthew John Dawson wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100853/
> -----------------------------------------------------------
>
> (Updated March 14, 2011, 2:55 a.m.)
>
>
> Review request for ownCloud.
>
>
> Summary
> -------
>
> When PHP moves a file across filesystem boundaries, it does not update the access/modification times.  Thus do it manually so that this information is not lost.
>
>
> Diffs
> -----
>
>   inc/lib_filestorage.php 06ce26f0d23df0414883152a14e027ac405701f7
>
> Diff: http://git.reviewboard.kde.org/r/100853/diff
>
>
> Testing
> -------
>
> Tested with moving with /tmp and owncloud's data directory being on different filesystems.  Also tested with file being on the same filesystem.  In both cases data was preserved.
>
>
> Thanks,
>
> Matthew John
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/owncloud/attachments/20110314/4d06633a/attachment.htm 

Reply | Threaded
Open this post in threaded view
|

Re: Review Request: When moving a file from a temporary location, also update the file access/modification times.

Matthew Dawson-2


> On March 14, 2011, 3:36 p.m., Robin Appelman wrote:
> > If the modify/access times are updated on fromTmpFile, shouldn't it also be done on toTmpFile?

Good point.  I tried adding the same support to toTmpFile, but the php's touch function isn't working, and I suspect there is a permissions problem.  I will post an updated patch with the support, as it doesn't cause errors but I don't know how useful it is.


- Matthew John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100853/#review1942
-----------------------------------------------------------


On March 14, 2011, 2:55 a.m., Matthew John Dawson wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100853/
> -----------------------------------------------------------
>
> (Updated March 14, 2011, 2:55 a.m.)
>
>
> Review request for ownCloud.
>
>
> Summary
> -------
>
> When PHP moves a file across filesystem boundaries, it does not update the access/modification times.  Thus do it manually so that this information is not lost.
>
>
> Diffs
> -----
>
>   inc/lib_filestorage.php 06ce26f0d23df0414883152a14e027ac405701f7
>
> Diff: http://git.reviewboard.kde.org/r/100853/diff
>
>
> Testing
> -------
>
> Tested with moving with /tmp and owncloud's data directory being on different filesystems.  Also tested with file being on the same filesystem.  In both cases data was preserved.
>
>
> Thanks,
>
> Matthew John
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/owncloud/attachments/20110316/1631de8c/attachment.htm 

Reply | Threaded
Open this post in threaded view
|

Re: Review Request: When moving a file from a temporary location, also update the file access/modification times.

Matthew Dawson-2
In reply to this post by Matthew Dawson-2

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100853/
-----------------------------------------------------------

(Updated March 16, 2011, 3:38 a.m.)


Review request for ownCloud.


Changes
-------

Add the same code to toTmpFile.  It doesn't appear to do anything, probably due to permission problems, but it doesn't cause any extra warning or failures.


Summary
-------

When PHP moves a file across filesystem boundaries, it does not update the access/modification times.  Thus do it manually so that this information is not lost.


Diffs (updated)
-----

  inc/lib_filestorage.php 06ce26f0d23df0414883152a14e027ac405701f7

Diff: http://git.reviewboard.kde.org/r/100853/diff


Testing
-------

Tested with moving with /tmp and owncloud's data directory being on different filesystems.  Also tested with file being on the same filesystem.  In both cases data was preserved.


Thanks,

Matthew John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/owncloud/attachments/20110316/70928a16/attachment.htm 

Reply | Threaded
Open this post in threaded view
|

Re: Review Request: When moving a file from a temporary location, also update the file access/modification times.

Robin Appelman

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100853/#review1995
-----------------------------------------------------------

Ship it!


Looks good to me

- Robin


On March 16, 2011, 3:38 a.m., Matthew John Dawson wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100853/
> -----------------------------------------------------------
>
> (Updated March 16, 2011, 3:38 a.m.)
>
>
> Review request for ownCloud.
>
>
> Summary
> -------
>
> When PHP moves a file across filesystem boundaries, it does not update the access/modification times.  Thus do it manually so that this information is not lost.
>
>
> Diffs
> -----
>
>   inc/lib_filestorage.php 06ce26f0d23df0414883152a14e027ac405701f7
>
> Diff: http://git.reviewboard.kde.org/r/100853/diff
>
>
> Testing
> -------
>
> Tested with moving with /tmp and owncloud's data directory being on different filesystems.  Also tested with file being on the same filesystem.  In both cases data was preserved.
>
>
> Thanks,
>
> Matthew John
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/owncloud/attachments/20110316/8cfd8711/attachment-0001.htm