fs-from-to-swap
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 24 Apr 2025 12:12:22 +0000 (14:12 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 24 Apr 2025 12:12:22 +0000 (14:12 +0200)
Change-Id: If5dae7fc440ad1a50bb77ac66edde5ae6381de67

src/service/src/dir_backend_fixed_size.cpp

index fab8cde7c65e7279111fc9f89cd7a647988bc1c2..a717420a11f2608cfd7c1b66918b565a2892c4b4 100644 (file)
@@ -51,8 +51,9 @@ fs::path DirBackendAddFixedSize::AddSubsessionPrepareFromTemplate (const fs::pat
        auto tmp_subsession_path = subsession_path;
        tmp_subsession_path.replace_filename(TMP_NEW_PREFIX + subsession_path.filename().native());
 
-       fs::copy_file (DirBackendFixedSize::GetImagePathFromSubsessionPath(subsession_path),
-                      DirBackendFixedSize::GetImagePathFromSubsessionPath(template_path));
+       fs::copy_file (DirBackendFixedSize::GetImagePathFromSubsessionPath(template_path),
+                      DirBackendFixedSize::GetImagePathFromSubsessionPath(tmp_subsession_path));
+
        do_resize2fs  (DirBackendFixedSize::GetImagePathFromSubsessionPath(tmp_subsession_path), size_kB);
 
        return tmp_subsession_path;