* FileName::changePermission(): upon Enrico's advice, don't check file writability, relies on ::chmod() returned error.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22190 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-12-17 16:52:24 +00:00
parent 5cad12a696
commit 18389fb6ee

View File

@ -199,11 +199,6 @@ bool FileName::moveTo(FileName const & name) const
bool FileName::changePermission(unsigned long int mode) const bool FileName::changePermission(unsigned long int mode) const
{ {
if (!isWritable()) {
LYXERR0("File " << *this << " is not writable!");
return false;
}
#if defined (HAVE_CHMOD) && defined (HAVE_MODE_T) #if defined (HAVE_CHMOD) && defined (HAVE_MODE_T)
if (::chmod(toFilesystemEncoding().c_str(), mode_t(mode)) != 0) { if (::chmod(toFilesystemEncoding().c_str(), mode_t(mode)) != 0) {
LYXERR0("File " << *this << ": cannot change permission to " LYXERR0("File " << *this << ": cannot change permission to "