aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/files.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/files.js')
-rw-r--r--src/js/files.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/js/files.js b/src/js/files.js
index b8aed05..a3a6458 100644
--- a/src/js/files.js
+++ b/src/js/files.js
@@ -109,7 +109,15 @@
var move = $.Deferred();
- src.moveTo( dest, null, move.resolve, move.reject);
+ var destPath = dest.fullPath + '/' + src.name;
+ var srcPath = src.fullPath + '';
+ if ( srcPath === destPath ) {
+ console.log('not moving because files are the same');
+ move.resolve( src );
+ } else {
+ console.log('paths differ so moving');
+ src.moveTo( dest, null, move.resolve, move.reject);
+ }
return move.promise();
}