Index: app/Http/Controllers/Dashboard/DepartmentsController.php
===================================================================
--- app/Http/Controllers/Dashboard/DepartmentsController.php	(revision 8fdb18e3a60e9c9f7b25649594d8f3836c68559d)
+++ app/Http/Controllers/Dashboard/DepartmentsController.php	(revision 1451c6ffa2e43a06d5042dcf8f124894350d0cae)
@@ -77,5 +77,6 @@
         {
             $location = 'Departments' . DIRECTORY_SEPARATOR . $request->code;
-            if(!Storage::disk('local')->has($location)){
+
+            if(!Storage::disk('local')->has($location) && Folder::where('department_id', $department->id)->pluck('no_of_files')->first() > 0){
                 Storage::disk('local')->move($oldLocation, $location);
                 $department->location = $location;
