[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Renaming: permission denied" file-error in Windows

From: Eli Zaretskii
Subject: Re: "Renaming: permission denied" file-error in Windows
Date: Sun, 11 Dec 2011 07:30:52 +0200

> Date: Sun, 11 Dec 2011 02:16:45 +0200
> From: LynX <address@hidden>
> I found that dired in Windows does not provide you possibility to move a 
> directory to a new location if this new location resides on a different 
> logical disk.
> For instance you have two opened dired buffers: `c:\dir1' and 
> `f:\dir2'. To move some files from `dir1' to `dir2' you can use "R", but 
> if you try to move some directory from `dir1' to `dir2' you will get 
> `Renaming: permission denied' error message.

Does Emacs on Unix or GNU/Linux systems allow moving a directory to a
different filesystem?  (I cannot test this where I'm typing this.)  If
not, the Windows behavior is not a bug.

> The problem occurs when dired calls Emacs function which delegates the 
> call to native POSIX function `rename'.
> In Windows `rename' operates a bit different than in other systems. 
> According to MSDN [http://msdn.microsoft.com/en-us/library/zw5t957f.aspx]:

Emacs doesn't call `rename' from the MS library, it has its own
replacement `sys_rename'.  So if we decide to modify this behavior, we

> -- "You can use rename to move a file from one directory or device to 
> another by giving a different path in the newname argument. However, you 
> cannot use rename to move a directory." --

But you _can_ rename or move a directory on MS-Windows, as long as the
destination is on the same drive.  Try it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]