You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temporary file management would be implemented using rah/eien. This would include:
An option, and defaults to, searching automatically for the system's temporary directory. This means the end user doesn't (necessarily) have to care about configuring it.
Using temporary files when doing the compressed version of the file. Current the temporary file is streamed to the final location without locking, and due to on-the-fly stream compression, the moving takes longer than simply renaming or copying the file. We should first compress, then move.
The text was updated successfully, but these errors were encountered:
@tristanvanbokkem Might not happen at all, actually. There is nothing wrong in how Danpu manages temporary files and does it well.
This is mainly only about moving the functionality to an external library (or using a library) and also about using temporary files the compression task, rather than streaming the file to final location. The latter would only improve things if the file and temporary location are on same volume, otherwise we still need to use copy instead of rename, resulting into the same situation.
The first point, in OP, about temporary directory location is not true. Danpu uses tempnam(), and it uses PHP's default temporary directory as a fallback. Well, it tries. Doing our own searching function is not feasible and may cause security issues since we can not know where you want to your files be put.
Unfortunately, there are no good libraries available for handling temporary files and atomic file operations do not exist in PHP. If the library can not be made atomic and completely error-aware, there is no point in writing one.
The only planned change is using temporary file for the compression task, and it will happen at some point. Due to the physical volume 'limitation' it's somewhat low priority.
Temporary file management would be implemented using rah/eien. This would include:
The text was updated successfully, but these errors were encountered: