Commits

Anonymous committed f93004a Draft

.

Comments (0)

Files changed (1)

src/post_template.ml

       let cache_dir_repos = get_cache_dir "repos"
 
 
+      let have_in_cache ~cachedir ~rkind =
+        match rkind with
+        | `File base_name ->
+            let cached_fname = cachedir </> base_name in
+            (   Sys.file_exists cached_fname
+             && not (Sys.is_directory cached_fname)
+            )
+        | `Repo ->
+            [| |] <> Sys.readdir cachedir
+
+
       let get_sources_cache pd ~dest ~rkind ~dlfunc ~cachedir =
 
 (*
                   (match cache_dir_opt with
                    | None -> no_cache ()
                    | Some cachedir ->
-                       get_sources_cache pd ~dest ~rkind ~dlfunc ~cachedir
+                       get_sources_cache pd ~dest ~rkind ~dlfunc
+                         ~cachedir:(cachedir </> pd.p_pkg_work_dir)
                   )
 
     end