/[mldonkey]/mldonkey/src/daemon/common/commonInteractive.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/common/commonInteractive.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by spiralvoice, Mon May 30 21:02:56 2005 UTC revision 1.34 by spiralvoice, Thu Jun 2 17:43:03 2005 UTC
# Line 117  let file_commit file = Line 117  let file_commit file =
117          let incoming =          let incoming =
118            if Unix2.is_directory file_name then            if Unix2.is_directory file_name then
119              incoming_directories ()              incoming_directories ()
120            else            else
121              incoming_files ()              incoming_files ()
122          in                  in        
123          let new_name = file_commited_name          let new_name = file_commited_name
124              incoming.shdir_dirname file in              incoming.shdir_dirname file in
125            if Unix2.is_directory file_name then Unix2.safe_mkdir new_name;
126          (try          (try
127              set_file_disk_name file new_name;              set_file_disk_name file new_name;
128              let best_name = file_best_name file in                let best_name = file_best_name file in  
129              Unix32.destroy (file_fd file);              Unix32.destroy (file_fd file);
130              if !verbose_files then lprintf "commonInteractive.file_commit: destroyed\n";              if !verbose_files then lprintf "commonInteractive.file_commit: destroyed\n";
131                if Unix2.is_directory file_name then Unix2.remove_all_directory file_name;
132              let impl = as_file_impl file in              let impl = as_file_impl file in
133                            
134  (* When the commit action is called, the file is supposed not to exist  (* When the commit action is called, the file is supposed not to exist
# Line 135  anymore. *) Line 137  anymore. *)
137                            
138              begin              begin
139                try                try
140                  if not (Unix2.is_directory new_name) then                  if not (Unix2.is_directory new_name) then
141                    ignore (CommonShared.new_shared                    ignore (CommonShared.new_shared
142                        incoming.shdir_dirname incoming.shdir_priority                        incoming.shdir_dirname incoming.shdir_priority
143                        best_name new_name);                        best_name new_name);

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26