1. David Boddie
  2. AccessPlusPython

Commits

mjwoodcock  committed dde84e0

Hide printer share.

  • Participants
  • Parent commits f8a52b1
  • Branches default

Comments (0)

Files changed (1)

File access.py

View file
         # other users write bit.
         if (mode & os.path.stat.S_IWOTH) == 0:
         
-            self.share_type |= SHARE_TYPE_PROTECTED
+            if self.share_type == SHARE_TYPE_NORMAL or self.share_type == SHARE_TYPE_DIRECTORY:
+                self.share_type |= SHARE_TYPE_PROTECTED
             self.read_mask = PROTECTED_READ
             self.write_mask = PROTECTED_WRITE
         
             
             share = Share(
                 name, directory, mode, delay, present, filetype, key,
-                SHARE_TYPE_NORMAL, self.file_handler
+                share_type, self.file_handler
                 )
             
             self.shares[(name, Hostaddr)] = share
             #
             #self.shares[(PrintShareName, Hostaddr)] = share
             self.add_share(
-                PrintShareName, directory, 0666, delay, "truncate", filetype
-                )
+                PrintShareName, directory, 0666, delay, "truncate", filetype,
+                0, SHARE_TYPE_HIDDEN)
     
     def remove_printer(self, name):