Re: Possible bug?
"Head Geek (伟思礼)" <[email protected]> Sun, 24 Aug 2025 07:56:49 -0700
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <[email protected]> |
> On Aug 24, 2025, at 04:29, Greg Troxel <[email protected]> wrote: > > "Head Geek (伟思礼)" <[email protected]> writes: > >> A puzzling phenomenon: >> >> I run some PHP apps on a couple of remote servers and use unison to sync local copies. >> >> Two of the apps have upgrade code that creates temporary directories but doesn't delete them when finished. >> >> When I run unison to sync, instead of creating those directories on the local copy, it deletes them from the remote server. >> >> Since they represent a change that happened on the server, I would expect that change to be repeated locally. >> >> Deleting them does not break the PHP apps, but it still seems like incorrect behavior. > > That is odd. If this isn't the latest release or the tip of master, you > should upgrade and try again, even if that isn't super likely to change > anything, assuming your version is not very old. > > I wonder if the directories have ever been created and removed on the > local machine. > > I wonder if they are empty after the upgrade process. I suspect they are: the upgrade of webtrees unzips new files to a temporary directory then moves them to their correct locations. The other isn't actually an upgrade; it creates a destination directory for uploads in the format named by the current year. In my opinion it (Wordpress) should cxreate it if needed when an upload occurs. Does unison delete empty directories instead of synchronizing them? I do occasionally remove empty directories, but I have run unison several times since the last time I did that locally. > You didn't mention OS, filesystems, use of NFS/CIFS, etc. Local is the latest macOS, and remote is Linux web17 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux unison is version 2.53.7 (ocaml 5.2.0) local and version 2.52.1 (ocaml 4.13.1) on the webserver > It would be great if you could turn this into a reproduction script, and > of course trying may cause you to figure out something else about the > situation, which currently has a lot of unknowns. I've put in a cronjob to remove empty directories daily at 03:23, but the next time there's an upgrade (always triggered manually), I'll delete the cron job and run unison with debug. The cronjob of course risks a server-side error removing local files, but the saerver has daily backups and the local has hourly, so I'm not worried. In fact, unison has always had that risk. -- Facebook with less garbage https://urldefense.com/v3/__https://mewe.com/wesgroleau/posts__;!!IBzWLUs!SFOW-nijJvDirgI1JgfP_pJeIRevk3vZ2ZvIiCAcWFBdY5uQjV2EJFW6qwgPFSxwdUv9pdvM5GeYaSokrCnyd-bdNEBi$ To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].