From: OpenSync <arm...@de...> - 2008-04-20 17:46:48
|
#729: file-sync does not sync recursively -------------------------------+-------------------------------------------- Reporter: halton | Owner: dgollub Type: defect | Status: new Priority: high | Milestone: Component: Plugin: file-sync | Version: 0.36 Severity: critical | Resolution: Keywords: | -------------------------------+-------------------------------------------- Comment (by ire...@su...): Daniel and Halton Just had a look at this bug. There's an recursive member in struct OSyncFileDir, if in the configuration file there's a line <recursive>TRUE</recursive>, then osync_filesync_report_dir will do a recursive call of itself to recursively look for the new/modified files in all the directories. The problem here is Assume that we are trying to sync the two directories from ~/sync1 to ~/sync2 1. if a new directory is created e.g. ~/sync1/good, and no file in it, the program just ignore that ~/sync1/good is a newly create directory, since there's no code to record the changes regarding directories. therefore no changes will be made in the syncing destination ~/sync2. 2. if a new directory is create and new files are added to it ~/sync1/good/bad (file), the program identifies the new files added: bad (but not the directory ~/sync1/good) and record the change. However, when osync_file_write is called to introduce the change to the syncing destination, and try to create the new file: ~/sync2/good/bad using g_io_channel_new_file, g_io_channel_new_file failed to create the new file because ~/sync2/good does not exist at all. Therefore, I guess we need to add a new format to the data objtype, e.g. "dir", so that we can handle the directories differently from file. However, since I am not familiar enough with the code, I haven't got an idea what's the best way to implement change. Daniel, do you have any suggestion regarding the issue? Thanks --Irene -- Ticket URL: <http://www.opensync.org/ticket/729#comment:1> OpenSync <http://www.opensync.org> A Synchronization Framework |