diff --git a/src/scripts/dataset/dataset.store.js b/src/scripts/dataset/dataset.store.js
index <HASH>..<HASH> 100644
--- a/src/scripts/dataset/dataset.store.js
+++ b/src/scripts/dataset/dataset.store.js
@@ -647,7 +647,7 @@ let datasetStore = Reflux.createStore({
                             this.updateDirectoryState(container._id, {children: children, loading: false});
                         });
                     } else {
-                        file.modifiedName = container.dirPath + file.name;
+                        file.modifiedName = container.dirPath ? container.dirPath + file.name : file.name;
                         scitran.updateFile('projects', this.data.dataset._id, file, () => {
                             let children = container.children;
                             children.unshift({
Fix issue with adding files to base directory of a dataset.