files_snapshots icon indicating copy to clipboard operation
files_snapshots copied to clipboard

filemtime(): stat failed

Open Greek64 opened this issue 6 years ago • 1 comments

I get ALOT of errors like the following:

filemtime(): stat failed for /storage/nextcloud/nextcloud/data/.zfs/snapshot/zfs-auto-snap_yearly-2017-12-31-2300//JohnD/files/Nextcloud Manual.pdf at /var/www/html/custom_apps/files_snapshots/lib/Snapshot.php#71

After some investigation it turns out that the file that it tries to run "filemtime" for, does not exist in the snapshots that it gets errors for.

My PHP knowledge is almost non existing, but I'm guessing that the filemtime is executed an all snapshots without checking if the relevant file even exists in the snapshot.

Greek64 avatar May 20 '18 10:05 Greek64

It seems like a bug in the app. The snapshot path is required to have a slash at the end (example /.zfs/snapshot/%snapshot%/ but it seems like it expects it to be without a slash at the end. Because it appends another slash, now there are two slashes: zfs-auto-snap_yearly-2017-12-31-2300//JohnD and for me: /Nextcloud/.zfs/snapshot/zfs-auto-snap_frequent-2019-12-06-1130//Derkades/files/

Derkades avatar Dec 06 '19 11:12 Derkades