I'm thinking since the --temporary-dir option specifies the working directory, shouldn't it default to completing muxing in this location before moving to the output directory? Additionally, os.rename will cause Invalid cross-device link (when I'm using rclone mount) (and this will also cause merging issue if muxing is doing in the output directory), so I'm wondering if it can be modified.
Regarding os.rename, I temporarily change it to as follows, which barely runs normally.
func TryMove(srcFile, dstFile string) error {
// Open the source file for reading
src, err := os.Open(srcFile)
if err != nil {
return err
}
defer src.Close()
// Create the destination file
dst, err := os.Create(dstFile)
if err != nil {
return err
}
defer dst.Close()
// Copy the contents of the source file to the destination file
_, err = io.Copy(dst, src)
if err != nil {
return err
}
// Close the destination file
if err := dst.Close(); err != nil {
return err
}
// Remove the source file
if err := os.Remove(srcFile); err != nil {
return err
}
return nil
}
I'm thinking since the
--temporary-dir
option specifies the working directory, shouldn't it default to completing muxing in this location before moving to the output directory? Additionally,os.rename
will causeInvalid cross-device link
(when I'm usingrclone mount
) (and this will also cause merging issue if muxing is doing in the output directory), so I'm wondering if it can be modified.Regarding
os.rename
, I temporarily change it to as follows, which barely runs normally.But a lot of log info is missing
In between, there's a gap that missing something like
Also, this part clearly has something wrong