This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 244286
Collapse All | Expand All

(-)a/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/BaseFileObj.java (+17 lines)
Lines 261-270 Link Here
261
            extensions.copyFailure(this, to);
261
            extensions.copyFailure(this, to);
262
            throw ioe;
262
            throw ioe;
263
        }
263
        }
264
        copyLastModifiedTime(to);
264
        extensions.copySuccess(this, to);
265
        extensions.copySuccess(this, to);
265
        return result;
266
        return result;
266
    }
267
    }
267
268
269
    private void copyLastModifiedTime(File target) {
270
        if (target == null || this.isFolder()) {
271
            return;
272
        }
273
        Date sourceDate = this.lastModified();
274
        long sourceDateMillis = sourceDate.getTime();
275
        if (sourceDateMillis > 0) {
276
            try {
277
                target.setLastModified(sourceDateMillis);
278
            } catch (SecurityException ex) {
279
                LOG.log(Level.INFO, "Cannot set last modified date on " //NOI18N
280
                        + target.getAbsolutePath(), ex);
281
            }
282
        }
283
    }
284
268
    @Override
285
    @Override
269
    public final FileObject move(FileLock lock, FileObject target, String name, String ext) throws IOException {
286
    public final FileObject move(FileLock lock, FileObject target, String name, String ext) throws IOException {
270
        if (FileUtil.isParentOf(this, target)) {
287
        if (FileUtil.isParentOf(this, target)) {

Return to bug 244286