Skip to content

Commit 2a892d6

Browse files
committed
issue doxygen#11600 Images with read-only file attributes can fail to copy
1 parent feee36e commit 2a892d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dir.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ bool Dir::copy(const std::string &srcName,const std::string &dstName,bool accept
334334
std::string sn = filePath(srcName,acceptsAbsPath);
335335
std::string dn = filePath(dstName,acceptsAbsPath);
336336
fs::copy(sn,dn,copyOptions,ec);
337+
// make sure the destination is writable for the owner (see issue #11600)
338+
fs::permissions(dn, fs::perms::owner_write, fs::perm_options::add, ec);
337339
return !ec;
338340
}
339341

0 commit comments

Comments
 (0)