Overview
Comment: | +[copyFileAtPath:toPath:]: Never override items. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ba57490ba604d42309f4c07e28d10d8d |
User & Date: | js on 2013-12-11 22:19:40 |
Other Links: | manifest | tags |
Context
2013-12-11
| ||
22:26 | +[{copy,rename}ItemAtPath...]: Require full path. check-in: 242fd56445 user: js tags: trunk | |
22:19 | +[copyFileAtPath:toPath:]: Never override items. check-in: ba57490ba6 user: js tags: trunk | |
2013-12-10
| ||
17:26 | Prevent entering directories twice. check-in: 0320eee453 user: js tags: trunk | |
Changes
Modified src/OFFile.h from [78ef5184a3] to [4cbfda525d].
︙ | |||
162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | - + - - + + + | permissions: (mode_t)permissions; #endif #ifdef OF_HAVE_CHOWN /*! * @brief Changes the owner of an item. * |
︙ | |||
207 208 209 210 211 212 213 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | - + - + | */ + (void)removeItemAtPath: (OFString*)path; #ifdef OF_HAVE_LINK /*! * @brief Creates a hard link for the specified item. * |
︙ |
Modified src/OFFile.m from [4da01770ca] to [d5e09aa3e8].
︙ | |||
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - | pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { OFArray *components = [OFArray arrayWithObjects: destination, [source lastPathComponent], nil]; destination = [OFString pathWithComponents: components]; } #ifndef _WIN32 if (lstat([destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE], &s) == 0) { #else if (_wstat([destination UTF16String], &s) == 0) { #endif errno = EEXIST; @throw [OFCopyItemFailedException exceptionWithSourcePath: source destinationPath: destination]; } #ifndef _WIN32 if (lstat([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], &s)) #else if (_wstat([source UTF16String], &s)) #endif @throw [OFCopyItemFailedException exceptionWithSourcePath: source destinationPath: destination]; |
︙ | |||
643 644 645 646 647 648 649 650 | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | + + + + + - - + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | destinationPath = [OFString pathWithComponents: components]; [OFFile copyItemAtPath: sourcePath toPath: destinationPath]; objc_autoreleasePoolPop(pool2); } } else if (S_ISREG(s.st_mode)) { size_t pageSize = [OFSystemInfo pageSize]; OFFile *sourceFile = nil; OFFile *destinationFile = nil; char *buffer; |
︙ |