Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3536

rename => newname() could support moving files

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Promise type: files
    • Labels:
      None

      Description

      The current implementation of the newname attribute in the rename body actually calls the rename() syscall which only works if the operation is an actual rename – change of path/name inside the same file system. However, renaming files is actually often interpreted as moving them and we could do the same.

      At least on Linux, there's a special errno EXDEV set by rename() in such cases so we could use that.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vpodzime Vratislav Podzimek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel